source: trunk/minix/commands/elvis/config.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 12.5 KB
Line 
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#ifndef _CONFIG_H
8# define _CONFIG_H
9
10/*************************** autoconf section ************************/
11
12/* Commodore-Amiga */
13#ifdef amiga
14# define AMIGA 1
15# define COMPILED_BY "Manx Aztec C 5.2b"
16#endif
17
18/* standard unix V (?) */
19#ifdef M_SYSV
20# define UNIXV 1
21#endif
22
23/* xelos system, University of Ulm */
24#ifdef xelos
25# define UNIXV 1
26#endif
27
28/* BSD UNIX? */
29#ifdef bsd
30# define BSD 1
31#else
32# ifdef sun
33# define BSD 1
34# endif
35#endif
36
37/* Microsoft C: sorry, Watcom does the same thing */
38#ifdef M_I86
39# ifndef M_SYSV
40# define MSDOS 1
41# ifdef IBMC2
42# define COMPILED_BY "IBM C/2 1.00"
43# else
44# define MICROSOFT 1
45# define COMPILED_BY "Microsoft C 5.10"
46# endif
47# endif
48#endif
49
50/* Borland's Turbo C */
51#ifdef __TURBOC__
52# define MSDOS 1
53# define TURBOC 1
54# ifdef __BORLANDC__
55# define COMPILED_BY "Borland C 2.00"
56# else
57# define COMPILED_BY (__TURBOC__ >= 661 ? "Turbo C++ 1.00" : "Turbo C 2.00")
58# endif
59#endif
60
61/* Tos Mark-Williams */
62#ifdef M68000
63# define TOS 1
64# define COMPILED_BY "Mark Williams C"
65#endif
66
67/* Tos GNU-C */
68#if defined(__atarist__) && defined(__gem__)
69# define TOS 1
70# define COMPILED_BY "GNU-C " __VERSION__
71#endif
72
73/* OS9/68000 */
74#ifdef OSK
75# define COMPILED_BY "Microware C V2.3 Edition 40"
76#endif
77
78/* DEC Rainbow, running MS-DOS (handled by earlier MS-DOS tests) */
79/* (would need -DRAINBOW in CFLAGS to compile a Rainbow-compatible .EXE) */
80
81#ifdef VMS
82# define COMPILED_BY "VAX/VMS VAXC compiler"
83# undef VMS
84# define VMS 1
85#endif
86
87/*************************** end of autoconf section ************************/
88
89/* All undefined symbols are defined to zero here, to allow for older */
90/* compilers which dont understand #if defined() or #if UNDEFINED_SYMBOL */
91
92/*************************** operating systems *****************************/
93
94#ifndef BSD
95# define BSD 0 /* UNIX - Berkeley 4.x */
96#endif
97
98#ifndef UNIXV
99# define UNIXV 0 /* UNIX - AT&T SYSV */
100#endif
101
102#ifndef UNIX7
103# define UNIX7 0 /* UNIX - version 7 */
104#endif
105
106#ifndef MSDOS
107# define MSDOS 0 /* PC */
108#endif
109
110#ifndef TOS
111# define TOS 0 /* Atari ST */
112#endif
113
114#ifndef AMIGA
115# define AMIGA 0 /* Commodore Amiga */
116#endif
117
118#ifndef OSK
119# define OSK 0 /* OS-9 / 68k */
120#endif
121
122#ifndef COHERENT
123# define COHERENT 0 /* Coherent */
124#endif
125
126#ifndef RAINBOW /* DEC Rainbow support, under MS-DOS */
127# define RAINBOW 0
128#endif
129
130#ifndef VMS
131# define VMS 0 /* VAX/VMS */
132#endif
133 /* Minix has no predefines */
134#if !BSD && !UNIXV && !UNIX7 && !MSDOS && !TOS && !AMIGA && !OSK && !COHERENT && !VMS
135# define MINIX 1
136#else
137# define MINIX 0
138#endif
139
140 /* generic combination of Unices */
141#if UNIXV || UNIX7 || BSD || MINIX || COHERENT
142# define ANY_UNIX 1
143#else
144# define ANY_UNIX 0
145#endif
146
147/*************************** compilers **************************************/
148
149#ifndef AZTEC_C
150# define AZTEC_C 0
151#endif
152
153#ifndef MICROSOFT
154# define MICROSOFT 0
155#endif
156
157#ifndef TURBOC
158# define TURBOC 0
159#endif
160
161/******************************* Credit ************************************/
162
163#if MSDOS
164# define CREDIT "Ported to MS-DOS by Guntram Blohm & Martin Patzel"
165# if RAINBOW
166# define CREDIT2 "Rainbow support added by Willett Kempton"
167# endif
168#endif
169
170#if AMIGA
171# define CREDIT "Ported to AmigaDOS 2.04 by Mike Rieser & Dale Rahn"
172#endif
173
174#if TOS
175# define CREDIT "Ported to Atari/TOS by Guntram Blohm & Martin Patzel"
176#endif
177
178#if OSK
179# define CREDIT "Ported to Microware OS9/68k by Peter Reinig"
180#endif
181
182#if COHERENT
183# define CREDIT "Ported to Coherent by Esa Ahola"
184#endif
185
186#if VMS
187# define CREDIT "Ported to VAX/VMS by John Campbell"
188#endif
189/*************************** functions depending on OS *********************/
190
191/* There are two terminal-related functions that we need: ttyread() and
192 * ttywrite(). The ttyread() function implements read-with-timeout and is
193 * a true function on all systems. The ttywrite() function is almost always
194 * just a macro...
195 */
196#if !TOS && !AMIGA
197# define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */
198#endif
199
200/* The strchr() function is an official standard now, so everybody has it
201 * except Unix version 7 (which is old) and BSD Unix (which is academic).
202 * Those guys use something called index() to do the same thing.
203 */
204#if BSD || UNIX7 || OSK
205# define strchr index
206#endif
207extern char *strchr();
208
209/* BSD uses bcopy() instead of memcpy() */
210#if BSD
211# define memcpy(dest, src, siz) bcopy(src, dest, siz)
212#endif
213
214/* BSD uses getwd() instead of getcwd(). The arguments are a little different,
215 * but we'll ignore that and hope for the best; adding arguments to the macro
216 * would mess up an "extern" declaration of the function.
217 */
218#if BSD || COHERENT
219# define getcwd getwd
220#endif
221extern char *getcwd();
222
223/* text versa binary mode for read/write */
224#if !TOS
225#define tread(fd,buf,n) read(fd,buf,(unsigned)(n))
226#define twrite(fd,buf,n) write(fd,buf,(unsigned)(n))
227#endif
228
229/**************************** Compiler quirks *********************************/
230
231/* the UNIX version 7 and (some) TOS compilers, don't allow "void" */
232#if UNIX7 || TOS
233# define void int
234#endif
235
236/* as far as I know, all compilers except version 7 support unsigned char */
237/* NEWFLASH: the Minix-ST compiler has subtle problems with unsigned char */
238#if UNIX7 || MINIX
239# define UCHAR(c) ((c) & 0xff)
240# define uchar char
241#else
242# define UCHAR(c) ((unsigned char)(c))
243# define uchar unsigned char
244#endif
245
246/* Some compilers prefer to have malloc declared as returning a (void *) */
247#if BSD || AMIGA
248extern void *malloc();
249#else
250extern char *malloc();
251#endif
252
253/* everybody but Amiga wants lseek declared here */
254#if !AMIGA
255extern long lseek();
256#endif
257
258/******************* Names of files and environment vars **********************/
259
260#if ANY_UNIX
261# ifndef TMPDIR
262# if MINIX
263# define TMPDIR "/tmp"
264# endif
265# endif
266# ifndef PRSVDIR
267# define PRSVDIR "/usr/preserve" /* directory where preserved file live */
268# endif
269# ifndef PRSVINDEX
270# define PRSVINDEX "/usr/preserve/Index" /* index of files in PRSVDIR */
271# endif
272# ifndef EXRC
273# define EXRC ".exrc" /* init file in current directory */
274# endif
275# define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
276# ifndef SHELL
277# define SHELL "/bin/sh" /* default shell */
278# endif
279# if COHERENT
280# ifndef REDIRECT
281# define REDIRECT ">" /* Coherent CC writes errors to stdout */
282# endif
283# endif
284#endif
285
286#if AMIGA /* Specify AMIGA environment */
287# ifndef CC_COMMAND
288# define CC_COMMAND "cc" /* generic C compiler */
289# endif
290# ifndef COLON
291# define COLON ':' /* Amiga files can also end in `:' */
292# endif
293# ifndef SYSEXRC
294# define SYSEXRC "S:" EXRC /* name of ".exrc" file in system dir */
295# endif
296# ifndef MAXRCLEN
297# define MAXRCLEN 2048 /* max size of a .exrc file */
298# endif
299# ifndef NBUFS
300# define NBUFS 10 /* must be at least 3 -- more is better */
301# endif
302# ifndef NEEDSYNC
303# define NEEDSYNC TRUE /* assume ":se sync" by default */
304# endif
305# ifndef PRSVDIR
306# define PRSVDIR "Elvis:" /* directory where preserved file live */
307# endif
308# ifndef PRSVINDEX
309# define PRSVINDEX "Elvis:Index" /* index of files in PRSVDIR */
310# endif
311# ifndef REDIRECT
312# define REDIRECT ">" /* Amiga writes errors to stdout */
313# endif
314# ifndef SCRATCHIN
315# define SCRATCHIN "%sSIXXXXXX"
316# endif
317# ifndef SCRATCHOUT
318# define SCRATCHOUT "%sSOXXXXXX"
319# endif
320# ifndef SHELL
321# define SHELL "newshell" /* default shell */
322# endif
323# ifndef TERMTYPE
324# define TERMTYPE "amiga" /* default termtype */
325# endif
326# ifndef TMPDIR /* for AMIGA should end in `:' or `/' */
327# define TMPDIR "T:" /* directory where temp files live */
328# endif
329# ifndef TMPNAME
330# define TMPNAME "%selv_%x.%x" /* format of names for temp files */
331# endif
332#endif
333
334#if MSDOS || TOS
335/* do not change TMPNAME and SCRATCH*: they MUST begin with '%s\\'! */
336# ifndef TMPDIR
337# define TMPDIR "C:\\tmp" /* directory where temp files live */
338# endif
339# ifndef PRSVDIR
340# define PRSVDIR "C:\\preserve" /* directory where preserved file live */
341# endif
342# ifndef PRSVINDEX
343# define PRSVINDEX "C:\\preserve\\Index" /* index of files in PRSVDIR */
344# endif
345# define TMPNAME "%s\\elv_%x.%x" /* temp file */
346# if MSDOS
347# if MICROSOFT
348# define CC_COMMAND "cl -c" /* C compiler */
349# else
350# if __BORLANDC__ /* Borland C */
351# define CC_COMMAND "bcc" /* C compiler */
352# else
353# if TURBOC /* Turbo C */
354# define CC_COMMAND "tcc" /* C compiler */
355# endif /* TURBOC */
356# endif /* BORLANDC */
357# endif /* MICROSOFT */
358# endif /* MSDOS */
359# define SCRATCHIN "%s\\siXXXXXX" /* DOS ONLY - output of filter program */
360# define SCRATCHOUT "%s\\soXXXXXX" /* temp file used as input to filter */
361# define SLASH '\\'
362# ifndef SHELL
363# if TOS
364# define SHELL "shell.ttp" /* default shell */
365# else
366# define SHELL "command.com" /* default shell */
367# endif
368# endif
369# define NEEDSYNC TRUE /* assume ":se sync" by default */
370# if TOS && __GNUC__ /* probably on other systems, too */
371# define REDIRECT "2>" /* GNUC reports on 2, others on 1 */
372# define CC_COMMAND "gcc -c"
373# else
374# define REDIRECT ">" /* shell's redirection of stderr */
375# endif
376#endif
377
378#if VMS
379/* do not change TMPNAME, and SCRATCH*: they MUST begin with '%s\\'! */
380# ifndef TMPDIR
381# define TMPDIR "sys$scratch:" /* directory where temp files live */
382# endif
383# define TMPNAME "%selv_%x.%x;1" /* temp file */
384# define SCRATCHIN "%ssiXXXXXX" /* DOS ONLY - output of filter program */
385# define SCRATCHOUT "%ssoXXXXXX" /* temp file used as input to filter */
386# define SLASH '\:' /* Worry point... jdc */
387# ifndef SHELL
388# define SHELL "" /* default shell */
389# endif
390# define REDIRECT ">" /* shell's redirection of stderr */
391# define tread(fd,buf,n) vms_read(fd,buf,(unsigned)(n))
392# define close vms_close
393# define lseek vms_lseek
394# define unlink vms_delete
395# define delete __delete /* local routine conflicts w/VMS rtl routine. */
396# define rpipe vms_rpipe
397# define rpclose vms_rpclose
398# define ttyread vms_ttyread
399/* There is no sync() on vms */
400# define sync()
401/* jdc -- seems VMS external symbols are case insensitive */
402# define m_fWord m_fw_ord
403# define m_bWord m_bw_ord
404# define m_eWord m_ew_ord
405# define m_Nsrch m_n_srch
406# define m_Fch m_f_ch
407# define m_Tch m_t_ch
408# define v_Xchar v_x_char
409/* jdc -- also, braindead vms curses always found by linker. */
410# define LINES elvis_LINES
411# define COLS elvis_COLS
412# define curscr elvis_curscr
413# define stdscr elvis_stdscr
414# define initscr elvis_initscr
415# define endwin elvis_endwin
416# define wrefresh elvis_wrefresh
417#endif
418
419#if OSK
420# ifndef TMPDIR
421# define TMPDIR "/dd/tmp" /* directory where temp files live */
422# endif
423# ifndef PRSVDIR
424# define PRSVDIR "/dd/usr/preserve" /* directory where preserved file live */
425# endif
426# ifndef PRSVINDEX
427# define PRSVINDEX "/dd/usr/preserve/Index" /* index of files in PRSVDIR */
428# endif
429# ifndef CC_COMMAND
430# define CC_COMMAND "cc -r" /* name of the compiler */
431# endif
432# ifndef EXRC
433# define EXRC ".exrc" /* init file in current directory */
434# endif
435# define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */
436# ifndef SHELL
437# define SHELL "shell" /* default shell */
438# endif
439# define FILEPERMS (S_IREAD|S_IWRITE) /* file permissions used for creat() */
440# define REDIRECT ">>-" /* shell's redirection of stderr */
441# define sync() /* OS9 doesn't need a sync() */
442#endif
443
444#ifndef TAGS
445# define TAGS "tags" /* name of the tags file */
446#endif
447
448#ifndef TMPNAME
449# define TMPNAME "%s/elv_%x.%x" /* format of names for temp files */
450#endif
451
452#ifndef EXINIT
453# define EXINIT "EXINIT" /* name of EXINIT environment variable */
454#endif
455
456#ifndef EXRC
457# define EXRC "elvis.rc" /* name of ".exrc" file in current dir */
458#endif
459
460#ifndef HMEXRC
461# define HMEXRC EXRC /* name of ".exrc" file in home dir */
462#endif
463
464#ifndef KEYWORDPRG
465# define KEYWORDPRG "ref"
466#endif
467
468#ifndef SCRATCHOUT
469# define SCRATCHIN "%s/SIXXXXXX"
470# define SCRATCHOUT "%s/SOXXXXXX"
471#endif
472
473#ifndef ERRLIST
474# define ERRLIST "errlist"
475#endif
476
477#ifndef SLASH
478# define SLASH '/'
479#endif
480
481#ifndef SHELL
482# define SHELL "shell"
483#endif
484
485#ifndef REG
486# define REG register
487#endif
488
489#ifndef NEEDSYNC
490# define NEEDSYNC FALSE
491#endif
492
493#ifndef FILEPERMS
494# define FILEPERMS 0666
495#endif
496
497#ifndef PRESERVE
498# define PRESERVE "elvprsv" /* name of the "preserve" program */
499#endif
500
501#ifndef CC_COMMAND
502# define CC_COMMAND "cc -c"
503#endif
504
505#ifndef MAKE_COMMAND
506# define MAKE_COMMAND "make"
507#endif
508
509#ifndef REDIRECT
510# define REDIRECT "2>"
511#endif
512
513#ifndef BLKSIZE
514# ifdef CRUNCH
515# define BLKSIZE 1024
516# else
517# define BLKSIZE 2048
518# endif
519#endif
520
521#ifndef KEYBUFSIZE
522# define KEYBUFSIZE 1000
523#endif
524
525#endif /* ndef _CONFIG_H */
Note: See TracBrowser for help on using the repository browser.