home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zoo21-2.zip / source / options.h < prev    next >
C/C++ Source or Header  |  1992-09-20  |  10KB  |  396 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, emx for OS/2                  */
  238. /***********************************************************************/
  239.  
  240. #if defined(MSC) || defined(__EMX__)
  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 HAVE_ISATTY
  276. #ifdef  PORTABLE        /* for testing only */
  277. # define SPECNEXT
  278. # define NIXTIME
  279. # undef  WILDCARD
  280. #endif
  281. #define FPUTCHAR
  282. #ifdef __GNUC__
  283. #pragma pack(1)
  284. #endif
  285. #endif /* MSC, __EMX__ */
  286.  
  287. /***********************************************************************/
  288. /* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS                */
  289. /***********************************************************************/
  290.  
  291. #ifdef GENERIC
  292. /* #define SPECNEXT */
  293. /* #define IGNORECASE */
  294. #define FNLIMIT 14
  295. #define NEEDCTYP
  296. #define CUR_DIR "."
  297. #define PATH_SEP "/"
  298. #define EXT_SEP  "/."
  299. /* #define NOSIGNAL */
  300. /* REN_LINK is UNIX-specific.  Can't find a generic rename() function */
  301. #define REN_LINK
  302. #define NOENUM
  303. /* #define SETBUF */
  304. #define CHEKDIR
  305. #define NIXTIME
  306. #define HAVE_ISATTY
  307. #define NEED_MEMMOVE
  308. #endif /* GENERIC */
  309.  
  310.  
  311. /***********************************************************************/
  312. /* REST OF THIS FILE SHOULD NOT NEED ANY CHANGES                       */
  313. /***********************************************************************/
  314.  
  315. /***********************************************************************/
  316. /*  Common filename conventions for **IX systems                       */
  317. /***********************************************************************/
  318.  
  319. #ifdef NIXFNAME
  320. #define CUR_DIR "."
  321. #define PATH_SEP "/"
  322. #define EXT_CH '.'
  323. #define EXT_SEP  "/."
  324. #define EXT_DFLT ".zoo"
  325. #endif
  326.  
  327. /* Compensate for strchr/index differences */
  328. #ifdef NOSTRCHR
  329. #define    strchr    index
  330. #define    strrchr    rindex
  331. #endif
  332.  
  333. /* let non-**IX lints under **IX work (see makefile) */
  334. #ifdef CROSS_LINT
  335. # undef ANSI_HDRS
  336. # undef ANSI_PROTO
  337. # ifdef STDARG
  338. #  undef STDARG
  339. #  define VARARGS
  340. # endif /* STDARG */
  341. #endif
  342.  
  343. /* assume certain defaults */
  344. #ifndef VOIDPTR
  345. # define VOIDPTR   char *
  346. #endif
  347.  
  348. #ifndef VER_DISPLAY
  349. # define VER_DISPLAY ";"
  350. #endif
  351. #ifndef VER_INPUT
  352. # define VER_INPUT ":;"
  353. #endif
  354. #ifndef PATH_CH
  355. # define PATH_CH "/"
  356. #endif
  357. #ifndef EXT_CH
  358. # define EXT_CH '.'
  359. #endif
  360. #ifndef EXT_DFLT
  361. # define EXT_DFLT ".zoo"
  362. #endif
  363.  
  364. #ifndef STDARG
  365. # ifndef VARARGS
  366. #  define VARARGS
  367. # endif
  368. #endif
  369.  
  370. #ifndef T_SIGNAL
  371. # define T_SIGNAL        int
  372. #endif
  373.  
  374. #ifdef STDARG
  375. # ifdef VARARGS
  376. # include "DO NOT DEFINE BOTH STDARG AND VARARGS"
  377. # endif
  378. #endif
  379.  
  380. /* We supply a default for T_UINT16 if it is not defined.  But this
  381. value is critical, so we compile in a runtime check. */
  382.  
  383. #ifndef T_UINT16
  384. # define T_UINT16    unsigned short
  385. # define CHECK_TUINT    /* will do runtime check for correct size */
  386. #endif
  387.  
  388. /* ANSI compatibility in declarations -- see zoofns.h for usage */
  389. #ifndef PARMS
  390. # ifdef ANSI_PROTO
  391. #  define PARMS(x)        x
  392. # else
  393. #  define PARMS(x)        ()
  394. # endif
  395. #endif
  396.