home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / z / zoo210sr.zip / ZOO210SR.TAZ / ZOO210SR.tar / zoo / options.h < prev    next >
C/C++ Source or Header  |  1991-07-14  |  8KB  |  345 lines

  1. /* @(#) options.h 2.22 88/08/24 15:27:36 */
  2.  
  3. /*
  4. The contents of this file are hereby released to the public domain.
  5.                            -- Rahul Dhesi 1991/07/06
  6.  
  7. For documentation about this file, see options.doc.
  8. */
  9.  
  10. #define ZOO                /* always defined */
  11. #define PORTABLE        /* always defined */
  12. #define ZOOCOMMENT    /* always defined */
  13.  
  14.  
  15. /***********************************************************************/
  16. /* SYSTEM V (should be compatible with most releases)                  */
  17. /***********************************************************************/
  18.  
  19. #ifdef SYS_V
  20. #define FILTER
  21. #define IO_MACROS
  22. #define EXISTS(f)        (access(f, 00) == 0)
  23. #define FNLIMIT 14
  24. #define CHEKDIR
  25. #define NIXTIME
  26. #define NIXFNAME
  27. #define NEEDCTYP
  28. #define NOENUM
  29. #define REN_LINK
  30. #define SETBUF
  31. #define GETTZ
  32. #define FATTR
  33. #define T_SIGNAL    void
  34. #define VARARGS
  35. #define NEED_MEMMOVE
  36. /* #define NEED_MEMCPY */
  37. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  38. #define HAVE_ISATTY
  39. /* #define NEED_VPRINTF */
  40. #endif /* SYS_V */
  41.  
  42. /***********************************************************************/
  43. /* Turbo C++ 1.0 under MS-DOS                                          */
  44. /***********************************************************************/
  45.  
  46. #ifdef TURBOC
  47. #undef PORTABLE
  48. #define ANSI_HDRS
  49. #define USE_ASCII
  50. #define SPECINIT
  51. #define SPECEXIT
  52. #define PURIFY
  53. #define DISK_CH ':'
  54. #define IGNORECASE
  55. #define WILDCARD "*.*"
  56. #define FOLD
  57. #define FORCESLASH
  58. #define FNLIMIT 12
  59. #define CUR_DIR "."
  60. #define PATH_SEP ":/\\"
  61. #define EXT_SEP  ":/\\."
  62. #define SETMODE
  63. /* 0x8000 and 0x4000 taken from <fcntl.h> for Turbo C */
  64. #define MODE_BIN(f)      setmode(fileno(f), 0x8000)
  65. #define MODE_TEXT(f)     setmode(fileno(f), 0x4000)
  66. #define NEED_STDIO
  67. #define ANSI_PROTO
  68. #define VOIDPTR        void *
  69. #define REN_STDC
  70. #define STDARG
  71. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  72. /* #define UNBUF_IO */
  73. /* #define UNBUF_LIMIT    512 */
  74. #define  T_SIGNAL void
  75. #define DIRECT_CONVERT
  76. #define STDARG
  77. #define CHECK_BREAK
  78. #define check_break kbhit
  79. #define HAVE_ISATTY
  80. #ifdef  PORTABLE        /* for testing only */
  81. # define SPECNEXT
  82. # define NIXTIME
  83. # undef  WILDCARD
  84. #endif
  85. #endif /* TURBOC */
  86.  
  87. /***********************************************************************/
  88. /* Older BSD 4.3 and most derivatives                                  */
  89. /***********************************************************************/
  90.  
  91. #ifdef BSD4_3
  92. #define NOSTRCHR /* not really needed for 4.3BSD */
  93. #define FILTER
  94. #define IO_MACROS
  95. #define EXISTS(f)        (access(f, 00) == 0)
  96. #define FNLIMIT 1023
  97. #define CHEKDIR
  98. #define NIXTIME
  99. #define NIXFNAME
  100. #define NEEDCTYP
  101. #define NOENUM
  102. #define REN_STDC
  103. #define SETBUF
  104. #define GETTZ
  105. #define FATTR
  106. #define T_SIGNAL    int
  107. #define VARARGS
  108. #define NEED_MEMMOVE
  109. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  110. #define HAVE_ISATTY
  111. #define NEED_VPRINTF        /* older BSDs only; newer ones have vprintf */
  112. #endif /* BSD4_3 */
  113.  
  114. /*  Ultrix 4.1 */
  115. #ifdef ULTRIX
  116. #define NO_STDIO_FN    /* avoid declaring certain stdio functions */
  117. #define NOSTRCHR /* needed? */
  118. #define FILTER
  119. #define IO_MACROS
  120. #define EXISTS(f)        (access(f, 00) == 0)
  121. #define FNLIMIT 1023
  122. #define CHEKDIR
  123. #define NIXTIME
  124. #define NIXFNAME
  125. #define NEEDCTYP
  126. #define NOENUM
  127. #define REN_STDC
  128. #define SETBUF
  129. #define GETTZ
  130. #define FATTR
  131. #define T_SIGNAL    void
  132. #define VARARGS
  133. #define NEED_MEMMOVE
  134. #define T_UINT16    unsigned short    /* must be 16 bit unsigned */
  135. #define HAVE_ISATTY
  136. /* #define NEED_VPRINTF */
  137. #define BSD4_3        /* for I/O definitions */
  138. #endif /* ULTRIX */
  139.  
  140. /***********************************************************************/
  141. /* Newer BSD 4.4 (projected)                                           */
  142. /***********************************************************************/
  143.  
  144. #ifdef BSD4_4
  145. /* #define NOSTRCHR */
  146. #define FILTER
  147. #define IO_MACROS
  148. #define EXISTS(f)        (access(f, 00) == 0)
  149. #define FNLIMIT 1023
  150. #define CHEKDIR
  151. #define NIXTIME
  152. #define NIXFNAME
  153. #define NEEDCTYP
  154. /* #define NOENUM */
  155. #define REN_STDC
  156. #define SETBUF
  157. #define GETTZ
  158. #define FATTR
  159. #define T_SIGNAL    void
  160. /* #define VARARGS */
  161. /* #define NEED_MEMMOVE */
  162. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  163. #define HAVE_ISATTY
  164. /* #define NEED_VPRINTF */
  165. #endif /* BSD4_4 */
  166.  
  167. /***********************************************************************/
  168. /* VAX/VMS version 5.3 or so                                           */
  169. /***********************************************************************/
  170.  
  171. #ifdef VMS
  172.  
  173. /*
  174. Select VMS pre-4.6 or later next line.  Pre-4.6 library does not have
  175. rename() and memset() so zoo defines its own;  4.6 has these, so we
  176. must use them, else VMS library functions will conflict with our
  177. own.
  178. */
  179. # if 0        /* Make this 1 for VMS version 4.5 or earlier */
  180. #  define NEED_VMS_RENAME    /* used in vms.c */
  181. #  define NEED_MEMSET
  182. # endif
  183. #define REN_STDC
  184. #define IO_MACROS
  185. #define SPEC_WILD
  186. #define EXT_ANYWAY
  187. #define VER_CH ';'
  188. #define SPECEXIT
  189. #define CHEKUDIR
  190. #define FNLIMIT 78
  191. #define DIR_SEP '.'  /* separates dir fields */
  192. #define DISK_CH ':'
  193. #define DIR_LBRACK "[" /* left bracketing symbol dir dir name */
  194. #define PATH_CH "]"
  195. #define PATH_SEP ":]"
  196. #define EXT_SEP ":]."
  197. #define CUR_DIR "."
  198. #define NIXTIME
  199. #define NEEDCTYP
  200. #define NOENUM
  201. #define IGNORECASE
  202. #define SPECMOD
  203. #define SPECNEXT
  204. #define WILDCARD "*.*"
  205. #define FOLD
  206. #define NO_STDIO_FN
  207. #define T_SIGNAL    void
  208. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  209. #define VARARGS
  210. #endif /* VMS */
  211.  
  212. /***********************************************************************/
  213. /* AMIGA, SOME VERSION -- NOT TESTED, MAY NEED PORTING                 */
  214. /***********************************************************************/
  215.  
  216. #ifdef MCH_AMIGA
  217. #define PURIFY
  218. #define DISK_CH ':'
  219. #define SPECNEXT
  220. #define WILDCARD "*"
  221. #define IGNORECASE
  222. #define FNLIMIT 30
  223. #define NEEDCTYP
  224. #define CUR_DIR "."
  225. #define PATH_SEP ":/"
  226. #define EXT_SEP  ":/."
  227. #define NOSIGNAL
  228. #define REN_STDC
  229. #define NOENUM
  230. #define SETBUF
  231. #define CHEKUDIR
  232. #define GETUTIME
  233. #define NIXTIME
  234. #endif
  235.  
  236. /***********************************************************************/
  237. /* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS                */
  238. /***********************************************************************/
  239.  
  240. #ifdef GENERIC
  241. /* #define SPECNEXT */
  242. /* #define IGNORECASE */
  243. #define FNLIMIT 14
  244. #define NEEDCTYP
  245. #define CUR_DIR "."
  246. #define PATH_SEP "/"
  247. #define EXT_SEP  "/."
  248. /* #define NOSIGNAL */
  249. /* REN_LINK is UNIX-specific.  Can't find a generic rename() function */
  250. #define REN_LINK
  251. #define NOENUM
  252. /* #define SETBUF */
  253. #define CHEKDIR
  254. #define NIXTIME
  255. #define HAVE_ISATTY
  256. #define NEED_MEMMOVE
  257. #endif /* GENERIC */
  258.  
  259.  
  260. /***********************************************************************/
  261. /* REST OF THIS FILE SHOULD NOT NEED ANY CHANGES                       */
  262. /***********************************************************************/
  263.  
  264. /***********************************************************************/
  265. /*  Common filename conventions for **IX systems                       */
  266. /***********************************************************************/
  267.  
  268. #ifdef NIXFNAME
  269. #define CUR_DIR "."
  270. #define PATH_SEP "/"
  271. #define EXT_CH '.'
  272. #define EXT_SEP  "/."
  273. #define EXT_DFLT ".zoo"
  274. #endif
  275.  
  276. /* Compensate for strchr/index differences */
  277. #ifdef NOSTRCHR
  278. #define    strchr    index
  279. #define    strrchr    rindex
  280. #endif
  281.  
  282. /* let non-**IX lints under **IX work (see makefile) */
  283. #ifdef CROSS_LINT
  284. # undef ANSI_HDRS
  285. # undef ANSI_PROTO
  286. # ifdef STDARG
  287. #  undef STDARG
  288. #  define VARARGS
  289. # endif /* STDARG */
  290. #endif
  291.  
  292. /* assume certain defaults */
  293. #ifndef VOIDPTR
  294. # define VOIDPTR   char *
  295. #endif
  296.  
  297. #ifndef VER_DISPLAY
  298. # define VER_DISPLAY ";"
  299. #endif
  300. #ifndef VER_INPUT
  301. # define VER_INPUT ":;"
  302. #endif
  303. #ifndef PATH_CH
  304. # define PATH_CH "/"
  305. #endif
  306. #ifndef EXT_CH
  307. # define EXT_CH '.'
  308. #endif
  309. #ifndef EXT_DFLT
  310. # define EXT_DFLT ".zoo"
  311. #endif
  312.  
  313. #ifndef STDARG
  314. # ifndef VARARGS
  315. #  define VARARGS
  316. # endif
  317. #endif
  318.  
  319. #ifndef T_SIGNAL
  320. # define T_SIGNAL        int
  321. #endif
  322.  
  323. #ifdef STDARG
  324. # ifdef VARARGS
  325. # include "DO NOT DEFINE BOTH STDARG AND VARARGS"
  326. # endif
  327. #endif
  328.  
  329. /* We supply a default for T_UINT16 if it is not defined.  But this
  330. value is critical, so we compile in a runtime check. */
  331.  
  332. #ifndef T_UINT16
  333. # define T_UINT16    unsigned short
  334. # define CHECK_TUINT    /* will do runtime check for correct size */
  335. #endif
  336.  
  337. /* ANSI compatibility in declarations -- see zoofns.h for usage */
  338. #ifndef PARMS
  339. # ifdef ANSI_PROTO
  340. #  define PARMS(x)        x
  341. # else
  342. #  define PARMS(x)        ()
  343. # endif
  344. #endif
  345.