1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

2008-06-18 Marcus Brinkmann <marcus@g10code.de>

* sysutils.h (translate_table_init, translate_table_lookup): New
	prototypes.
	* sysutils.c: Include <ctype.h>.
	(FD_TRANSLATE_MAX): New macro.
	(fd_translate, fd_translate_len): New static variables.
	(translate_table_init, translate_table_lookup): New functions.
	(translate_sys2libc_fd_int): Translate file descriptor.
	* iobuf.c (check_special_filename): Translate handle values from
	special filenames.
This commit is contained in:
Marcus Brinkmann 2008-06-18 14:46:05 +00:00
parent aa68a60301
commit 02bc6e886c
4 changed files with 141 additions and 1 deletions

View file

@ -43,6 +43,16 @@ int enable_core_dumps (void);
const unsigned char *get_session_marker (size_t *rlen);
/*int check_permissions (const char *path,int extension,int checkonly);*/
void gnupg_sleep (unsigned int seconds);
/* Initialize the fd translation table. This reads one line from
stdin which is expected to be in the format "FROM TO [...]" where
each "FROM TO" pair are two handle numbers. Handle number FROM on
the command line is translated to handle number TO. */
void translate_table_init (void);
/* Translate a handle number. */
int translate_table_lookup (int fd);
int translate_sys2libc_fd (gnupg_fd_t fd, int for_write);
int translate_sys2libc_fd_int (int fd, int for_write);
FILE *gnupg_tmpfile (void);