home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / elvis_1.4.tar.Z / elvis_1.4.tar / config.h < prev    next >
C/C++ Source or Header  |  1990-12-06  |  8KB  |  352 lines

  1. /*
  2.  * vi configuration file
  3.  * We try to automatically configure to various compilers and operating
  4.  * systems. Extend the autoconf section as needed.
  5.  */
  6.  
  7. /*************************** autoconf section ************************/
  8.  
  9. /* standard unix V (?) */
  10. #ifdef    M_SYSV
  11. # define UNIXV        1
  12. #endif
  13.  
  14. /* xelos system, University of Ulm */
  15. #ifdef    xelos
  16. # define UNIXV        1
  17. #endif
  18.  
  19. /* BSD UNIX? */
  20. #ifdef bsd
  21. # define BSD        1
  22. #endif
  23.  
  24. /* Microsoft C: sorry, Watcom does the same thing */
  25. #ifdef    M_I86
  26. # ifndef M_SYSV
  27. #  define MSDOS        1
  28. #  define MICROSOFT    1
  29. #  define COMPILED_BY    "Microsoft C 5.10"
  30. # endif
  31. #endif
  32.  
  33. /* Borlands Turbo C */
  34. #ifdef    __TURBOC__
  35. # define MSDOS        1
  36. # define TURBOC        1
  37. # define COMPILED_BY    "Turbo C 2.00"
  38. #endif
  39.  
  40. /* Tos Mark-Williams */
  41. #ifdef    M68000
  42. # define TOS 1
  43. # define COMPILED_BY    "Mark Williams C"
  44. #endif
  45.  
  46. /* OS9/68000 */
  47. #ifdef    OSK
  48. # define COMPILED_BY    "Microware C V2.3 Edition 40"
  49. #endif
  50.  
  51. /*************************** end of autoconf section ************************/
  52.  
  53. /* All undefined symbols are defined to zero here, to allow for older    */
  54. /* compilers which dont understand #if defined() or #if UNDEFINED_SYMBOL */
  55.  
  56. /*************************** operating systems *****************************/
  57.  
  58. #ifndef    BSD
  59. # define BSD    0        /* UNIX - Berkeley 4.x */
  60. #endif
  61.  
  62. #ifndef    UNIXV
  63. # define UNIXV    0        /* UNIX - AT&T SYSV */
  64. #endif
  65.  
  66. #ifndef    UNIX7
  67. # define UNIX7    0        /* UNIX - version 7 */
  68. #endif
  69.  
  70. #ifndef    MSDOS
  71. # define MSDOS    0        /* PC        */
  72. #endif
  73.  
  74. #ifndef    TOS
  75. # define TOS    0        /* Atari ST    */
  76. #endif
  77.  
  78. #ifndef    AMIGA
  79. # define AMIGA    0        /* Commodore Amiga */
  80. #endif
  81.  
  82. #ifndef OSK
  83. # define OSK    0        /* OS-9 / 68k */
  84. #endif
  85.  
  86. #ifndef COHERENT
  87. # define COHERENT 0        /* Coherent */
  88. #endif
  89.  
  90.                 /* Minix has no predefines */
  91. #if !BSD && !UNIXV && !UNIX7 && !MSDOS && !TOS && !AMIGA && !OSK && !COHERENT
  92. # define MINIX    1
  93. #else
  94. # define MINIX    0
  95. #endif
  96.  
  97.                 /* generic combination of Unices */
  98. #if UNIXV || UNIX7 || BSD || MINIX || COHERENT
  99. # define ANY_UNIX 1
  100. #else
  101. # define ANY_UNIX 0
  102. #endif
  103.  
  104. /*************************** compilers **************************************/
  105.  
  106. #ifndef    MICROSOFT
  107. # define MICROSOFT    0
  108. #endif
  109.  
  110. #ifndef    TURBOC
  111. # define TURBOC        0
  112. #endif
  113.  
  114. /******************************* Credit ************************************/
  115.  
  116. #if MSDOS
  117. # define CREDIT "Ported to MS-DOS by Guntram Blohm & Martin Patzel"
  118. #endif
  119.  
  120. #if TOS
  121. # define CREDIT "Ported to Atari/TOS by Guntram Blohm & Martin Patzel"
  122. #endif
  123.  
  124. #if OSK
  125. # define CREDIT    "Ported to Microware OS9/68k by Peter Reinig"
  126. #endif
  127.  
  128. #if COHERENT
  129. # define CREDIT    "Ported to Coherent by Esa Ahola"
  130. #endif
  131.  
  132. /*************************** functions depending on OS *********************/
  133.  
  134. /* Only MSDOS, TOS, and OS9 need a special function for reading from the
  135.  * keyboard.  All others just read from file descriptor 0.
  136.  */
  137. #if !MSDOS && !TOS && !OSK
  138. # define ttyread(buf, len)    read(0, buf, (unsigned)len)    /* raw read */
  139. #endif
  140. #if !TOS
  141. # define ttywrite(buf, len)    write(1, buf, (unsigned)(len))    /* raw write */
  142. #endif
  143.  
  144. /* The strchr() function is an official standard now, so everybody has it
  145.  * except Unix version 7 (which is old) and BSD Unix (which is academic).
  146.  * Those guys use something called index() to do the same thing.
  147.  */
  148. #if BSD || UNIX7 || OSK
  149. # define strchr    index
  150. #endif
  151. extern char *strchr();
  152.  
  153. /* BSD uses bcopy() instead of memcpy() */
  154. #if BSD
  155. #define memcpy(dest, src, siz)    bcopy(src, dest, siz)
  156. #endif
  157.  
  158. /* text versa binary mode for read/write */
  159. #if !TOS
  160. #define    tread(fd,buf,n)        read(fd,buf,(unsigned)(n))
  161. #define twrite(fd,buf,n)    write(fd,buf,(unsigned)(n))
  162. #endif
  163.  
  164. /**************************** Compiler quirks *********************************/
  165.  
  166. /* the UNIX version 7 and (some) TOS compilers, don't allow "void" */
  167. #if UNIX7 || TOS
  168. # define void int
  169. #endif
  170.  
  171. /* as far as I know, all compilers except version 7 support unsigned char */
  172. /* NEWFLASH: the Minix-ST compiler has subtle problems with unsigned char */
  173. #if UNIX7 || MINIX
  174. # define UCHAR(c)    ((c) & 0xff)
  175. # define uchar        char
  176. #else
  177. # define UCHAR(c)    ((unsigned char)(c))
  178. # define uchar        unsigned char
  179. #endif
  180.  
  181. /* Some compilers prefer to have malloc declared as returning a (void *) */
  182. #if BSD
  183. extern void *malloc();
  184. #else
  185. extern char *malloc();
  186. #endif
  187.  
  188. /* Most compilers could benefit from using the "register" storage class */
  189. #if 1
  190. # define REG    register
  191. #endif
  192.  
  193. /******************* Names of files and environment vars **********************/
  194.  
  195. #if ANY_UNIX
  196. # ifndef TMPDIR
  197. #  if MINIX
  198. #   define TMPDIR    "/usr/tmp"    /* Keep elvis' temp files off RAM disk! */
  199. #  else
  200. #   define TMPDIR    "/tmp"        /* directory where temp files live */
  201. #  endif
  202. # endif
  203. # define TMPNAME    "%s/elv%x%04x%03x" /* temp file */
  204. # define CUTNAME    "%s/elv_%04x%03x" /* cut buffer's temp file */
  205. # ifndef EXRC
  206. #  define EXRC        ".exrc"        /* init file in current directory */
  207. # endif
  208. # define SCRATCHOUT    "%s/soXXXXXX"    /* temp file used as input to filter */
  209. # ifndef EXINIT
  210. #  define EXINIT    "EXINIT"
  211. # endif
  212. # ifndef SHELL
  213. #  define SHELL        "/bin/sh"    /* default shell */
  214. # endif
  215. # if COHERENT
  216. #  ifndef REDIRECT
  217. #   define REDIRECT    ">"        /* Coherent CC writes errors to stdout */
  218. #  endif
  219. # endif
  220. #endif
  221.  
  222. #if MSDOS || TOS
  223. /* do not change TMPNAME, CUTNAME and SCRATCH*: they MUST begin with '%s\\'! */
  224. # ifndef TMPDIR
  225. #  define TMPDIR    "C:\\tmp"    /* directory where temp files live */
  226. # endif
  227. # define TMPNAME    "%s\\elv%x%04x.%03x" /* temp file */
  228. # define CUTNAME    "%s\\elv_%04x.%03x" /* cut buffer's temp file */
  229. # if MSDOS
  230. #  if MICROSOFT
  231. #   define CC_COMMAND    "cl -c"        /* C compiler */
  232. #  else /* TURBO_C */
  233. #   define CC_COMMAND    "tc"        /* C compiler */
  234. #  endif
  235. # endif
  236. # define SCRATCHIN    "%s\\siXXXXXX"    /* DOS ONLY - output of filter program */
  237. # define SCRATCHOUT    "%s\\soXXXXXX"    /* temp file used as input to filter */
  238. # define SLASH        '\\'
  239. # ifndef SHELL
  240. #  if TOS
  241. #   define SHELL    "shell.ttp"    /* default shell */
  242. #  else
  243. #   define SHELL    "command.com"    /* default shell */
  244. #  endif
  245. # endif
  246. # define NEEDSYNC    TRUE        /* assume ":se sync" by default */
  247. # define REDIRECT    ">"        /* shell's redirection of stderr */
  248. # ifndef MAXMAPS
  249. #  define MAXMAPS    40
  250. # endif
  251. # ifndef EXINIT
  252. #  define EXINIT    "EXINIT"
  253. # endif
  254. #endif
  255.  
  256. #if OSK
  257. # ifndef TMPDIR
  258. #  define TMPDIR    "/dd/tmp"       /* directory where temp files live */
  259. # endif
  260. # define TMPNAME    "%s/elv%x%04x%03x"  /* temp file */
  261. # define CUTNAME    "%s/elv_%04x%03x"  /* cut buffer's temp file */
  262. # ifndef CC_COMMAND
  263. #  define CC_COMMAND    "cc -r"           /* name of the compiler */
  264. # endif
  265. # ifndef EXRC
  266. #  define EXRC        ".exrc"           /* init file in current directory */
  267. # endif
  268. # define SCRATCHOUT    "%s/soXXXXXX"       /* temp file used as input to filter */
  269. # ifndef SHELL
  270. #  define SHELL        "shell"           /* default shell */
  271. # endif
  272. # define FILEPERMS    (S_IREAD|S_IWRITE) /* file permissions used for creat() */
  273. # define REDIRECT    ">>-"           /* shell's redirection of stderr */
  274. #endif
  275.  
  276. #ifndef    TAGS
  277. # define TAGS        "tags"        /* tags file */
  278. #endif
  279.  
  280. #ifndef TMPNAME
  281. # define TMPNAME    "%s/elv%x%04x.%03x"    /* temp file */
  282. #endif
  283.  
  284. #ifndef CUTNAME
  285. # define CUTNAME    "%s/elv_%04x.%03x"    /* cut buffer's temp file */
  286. #endif
  287.  
  288. #ifndef    EXRC
  289. # define EXRC        "elvis.rc"
  290. #endif
  291.  
  292. #ifndef HMEXRC
  293. # if !MSDOS && !TOS
  294. #  define HMEXRC    EXRC
  295. # endif
  296. #endif
  297.  
  298. #ifndef    KEYWORDPRG
  299. # define KEYWORDPRG    "ref"
  300. #endif
  301.  
  302. #ifndef    SCRATCHOUT
  303. # define SCRATCHIN    "%s/SIXXXXXX"
  304. # define SCRATCHOUT    "%s/SOXXXXXX"
  305. #endif
  306.  
  307. #ifndef ERRLIST
  308. # define ERRLIST    "errlist"
  309. #endif
  310.  
  311. #ifndef    SLASH
  312. # define SLASH        '/'
  313. #endif
  314.  
  315. #ifndef SHELL
  316. # define SHELL        "shell"
  317. #endif
  318.  
  319. #ifndef REG
  320. # define REG
  321. #endif
  322.  
  323. #ifndef NEEDSYNC
  324. # define NEEDSYNC    FALSE
  325. #endif
  326.  
  327. #ifndef FILEPERMS
  328. # define FILEPERMS    0666
  329. #endif
  330.  
  331. #ifndef CC_COMMAND
  332. # define CC_COMMAND    "cc -c"
  333. #endif
  334.  
  335. #ifndef MAKE_COMMAND
  336. # define MAKE_COMMAND    "make"
  337. #endif
  338.  
  339. #ifndef REDIRECT
  340. # define REDIRECT    "2>"
  341. #endif
  342.  
  343. #ifndef MAXMAPS
  344. # define MAXMAPS    20        /* number of :map keys */
  345. #endif
  346. #ifndef MAXDIGS
  347. # define MAXDIGS    30        /* number of :digraph combos */
  348. #endif
  349. #ifndef MAXABBR
  350. # define MAXABBR    20        /* number of :abbr entries */
  351. #endif
  352.