Back to index

tetex-bin  3.0
basics.h
Go to the documentation of this file.
00001 /* FILE:    basics.h
00002  * PURPOSE: basic definitions
00003  * AUTHOR:  Piet Tutelaers
00004  * VERSION: 1.0 (September 1995)
00005  */
00006 
00007 
00008 #ifndef NOBASICS
00009 
00010 #if defined(KPATHSEA)
00011 #  include <kpathsea/config.h>
00012 #  include <kpathsea/c-pathch.h>
00013 #  include <kpathsea/c-fopen.h>
00014 #  include <c-auto.h>
00015 #  define PATHSEP ENV_SEP
00016 #  define DIRSEP  DIR_SEP
00017 #  define RB FOPEN_RBIN_MODE
00018 #  define WB FOPEN_WBIN_MODE
00019 #  if defined(DOSISH)
00020 #    define ESCAPECHAR '!'
00021 #    define RECURSIVE "!!"
00022 #  endif /* DOSISH */
00023 #  define basename ps2pk_basename
00024 #elif defined(MSDOS) || defined(WIN32)
00025 #  define PATHSEP ';'
00026 #  define DIRSEP '\\'
00027 #  define ESCAPECHAR '!'
00028 #  define RECURSIVE "!!"
00029 #  define PSRES_NAME "psres.dpr"
00030 #  define RB "rb"
00031 #  define WB "wb"
00032 #endif
00033  
00034 #ifndef PATHSEP
00035 #define PATHSEP ':'
00036 #endif
00037 
00038 #ifndef DIRSEP
00039 #define DIRSEP '/'
00040 #endif
00041 
00042 #ifndef ESCAPECHAR
00043 #define ESCAPECHAR '\\'
00044 #endif
00045 
00046 #ifndef RECURSIVE
00047 #define RECURSIVE "//"
00048 #endif
00049 
00050 /* TeX PS Resource database name */
00051 #ifndef PSRES_NAME
00052 #define PSRES_NAME   "PSres.upr"
00053 #endif
00054 
00055 #ifndef RB
00056 #define RB "r"
00057 #endif
00058 
00059 #ifndef WB
00060 #define WB "w"
00061 #endif
00062 
00063 #ifndef MAXPATHLEN
00064 #define MAXPATHLEN 256
00065 #endif
00066 
00067 #ifndef MAXSTRLEN
00068 #define MAXSTRLEN 256
00069 #endif
00070 
00071 #ifndef IS_DIR_SEP
00072 #define IS_DIR_SEP(c) ((c) == DIRSEP)
00073 #endif
00074 
00075 #define NOBASICS
00076 #endif
00077 
00078 #include <stdarg.h>
00079 
00080 void fatal(char *fmt, ...);
00081 void msg(char *fmt, ...);
00082 
00083 /* For debugging purposes it is handy to have a fopen() function that
00084  * shows which files are opened.
00085  */
00086 
00087 #include <stdio.h>
00088 
00089 #include <sys/types.h>  /* struct stat */
00090 #include <sys/stat.h>   /* stat() */