--- pgp/src/fileio.h 2018/04/24 16:39:29 1.1.1.3 +++ pgp/src/fileio.h 2018/04/24 16:42:28 1.1.1.6 @@ -7,6 +7,7 @@ #endif #ifdef VMS +#define PGP_SYSTEM_DIR "PGP$LIBRARY:" #define FOPRBIN "rb","ctx=stm" #define FOPRTXT "r" #if 0 @@ -20,6 +21,11 @@ #define FOPWPBIN "w+b","ctx=stm" #else #ifdef UNIX +/* + * Directory for system-wide files. Must end in a /, ready for + * dumb appending of the filename. (If not defined, it's not used.) + */ +#define PGP_SYSTEM_DIR "/usr/local/lib/pgp/" #define FOPRBIN "r" #define FOPRTXT "r" #define FOPWBIN "w" @@ -41,10 +47,6 @@ #define equal_buffers(buf1,buf2,count) !memcmp( buf1, buf2, count ) -/* This macro is for burning sensitive data (byte arrays only) on stack. - Many of the file I/O routines use it for zapping buffers */ -#define burn(x) fill0(x,sizeof(x)) - /* Returns TRUE iff file is can be opened for reading. */ boolean file_exists(char *filename); @@ -79,6 +81,9 @@ char *maybe_force_extension(char *filena variable PGPPATH */ char *buildfilename(char *result, char *fname); +/* The same, but also searches PGP_SYETEM_DIR */ +char *buildsysfilename(char *result, char *fname); + /* Build a path for fileName based on origPath */ int build_path(char *path, char *fileName, char *origPath); @@ -143,3 +148,8 @@ extern void settmpdir(char *path); extern void setoutdir(char *filename); extern boolean is_tempfile(char *path); extern boolean has_extension(char *filename, char *extension); + +/* Directories to search for the manuals */ +extern char const * const manual_dirs[]; +/* Returns non-zero if any manuals are missing */ +unsigned manuals_missing(void);