home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO21E.EXE / OPTIONS.H < prev    next >
C/C++ Source or Header  |  1991-07-14  |  10KB  |  395 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. /* Microsoft C 6.00 for MS-DOS and OS/2                                */
  238. /***********************************************************************/
  239.  
  240. #ifdef MSC
  241. #undef PORTABLE
  242. #define FILTER
  243. #define NEEDCTYP
  244. #define MEMSET
  245. #define ANSI_HDRS
  246. #define USE_ASCII
  247. #define SPECINIT
  248. #define SPECEXIT
  249. #define PURIFY
  250. #define DISK_CH ':'
  251. #define IGNORECASE
  252. #define WILDCARD "*.*"
  253. #ifndef OS2
  254. #define FOLD
  255. #endif
  256. #define FORCESLASH
  257. #define FNLIMIT 256
  258. #define CUR_DIR "."
  259. #define PATH_SEP ":/\\"
  260. #define EXT_SEP  ":/\\."
  261. #define SETMODE
  262. #define MODE_BIN(f)      setmode(fileno(f), 0x8000)
  263. #define MODE_TEXT(f)     setmode(fileno(f), 0x4000)
  264. #define NEED_STDIO
  265. #define ANSI_PROTO
  266. #define VOIDPTR        void *
  267. #define REN_STDC
  268. #define STDARG
  269. #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  270. /* #define UNBUF_IO */
  271. /* #define UNBUF_LIMIT    512 */
  272. #define  T_SIGNAL void
  273. #define DIRECT_CONVERT
  274. #define STDARG
  275. #define CHECK_BREAK
  276. #define check_break kbhit
  277. #define HAVE_ISATTY
  278. #ifdef  PORTABLE        /* for testing only */
  279. # define SPECNEXT
  280. # define NIXTIME
  281. # undef  WILDCARD
  282. #endif
  283. #define FPUTCHAR
  284. #endif /* MSC */
  285.  
  286. /***********************************************************************/
  287. /* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS                */
  288. /***********************************************************************/
  289.  
  290. #ifdef GENERIC
  291. /* #define SPECNEXT */
  292. /* #define IGNORECASE */
  293. #define FNLIMIT 14
  294. #define NEEDCTYP
  295. #define CUR_DIR "."
  296. #define PATH_SEP "/"
  297. #define EXT_SEP  "/."
  298. /* #define NOSIGNAL */
  299. /* REN_LINK is UNIX-specific.  Can't find a generic rename() function */
  300. #define REN_LINK
  301. #define NOENUM
  302. /* #define SETBUF */
  303. #define CHEKDIR
  304. #define NIXTIME
  305. #define HAVE_ISATTY
  306. #define NEED_MEMMOVE
  307. #endif /* GENERIC */
  308.  
  309.  
  310. /***********************************************************************/
  311. /* REST OF THIS FILE SHOULD NOT NEED ANY CHANGES                       */
  312. /***********************************************************************/
  313.  
  314. /***********************************************************************/
  315. /*  Common filename conventions for **IX systems                       */
  316. /***********************************************************************/
  317.  
  318. #ifdef NIXFNAME
  319. #define CUR_DIR "."
  320. #define PATH_SEP "/"
  321. #define EXT_CH '.'
  322. #define EXT_SEP  "/."
  323. #define EXT_DFLT ".zoo"
  324. #endif
  325.  
  326. /* Compensate for strchr/index differences */
  327. #ifdef NOSTRCHR
  328. #define    strchr    index
  329. #define    strrchr    rindex
  330. #endif
  331.  
  332. /* let non-**IX lints under **IX work (see makefile) */
  333. #ifdef CROSS_LINT
  334. # undef ANSI_HDRS
  335. # undef ANSI_PROTO
  336. # ifdef STDARG
  337. #  undef STDARG
  338. #  define VARARGS
  339. # endif /* STDARG */
  340. #endif
  341.  
  342. /* assume certain defaults */
  343. #ifndef VOIDPTR
  344. # define VOIDPTR   char *
  345. #endif
  346.  
  347. #ifndef VER_DISPLAY
  348. # define VER_DISPLAY ";"
  349. #endif
  350. #ifndef VER_INPUT
  351. # define VER_INPUT ":;"
  352. #endif
  353. #ifndef PATH_CH
  354. # define PATH_CH "/"
  355. #endif
  356. #ifndef EXT_CH
  357. # define EXT_CH '.'
  358. #endif
  359. #ifndef EXT_DFLT
  360. # define EXT_DFLT ".zoo"
  361. #endif
  362.  
  363. #ifndef STDARG
  364. # ifndef VARARGS
  365. #  define VARARGS
  366. # endif
  367. #endif
  368.  
  369. #ifndef T_SIGNAL
  370. # define T_SIGNAL        int
  371. #endif
  372.  
  373. #ifdef STDARG
  374. # ifdef VARARGS
  375. # include "DO NOT DEFINE BOTH STDARG AND VARARGS"
  376. # endif
  377. #endif
  378.  
  379. /* We supply a default for T_UINT16 if it is not defined.  But this
  380. value is critical, so we compile in a runtime check. */
  381.  
  382. #ifndef T_UINT16
  383. # define T_UINT16    unsigned short
  384. # define CHECK_TUINT    /* will do runtime check for correct size */
  385. #endif
  386.  
  387. /* ANSI compatibility in declarations -- see zoofns.h for usage */
  388. #ifndef PARMS
  389. # ifdef ANSI_PROTO
  390. #  define PARMS(x)        x
  391. # else
  392. #  define PARMS(x)        ()
  393. # endif
  394. #endif
  395.