~ubuntu-branches/ubuntu/karmic/fweb/karmic

« back to all changes in this revision

Viewing changes to Boot/vax/custom.h

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-01-04 23:20:22 UTC
  • Revision ID: james.westby@ubuntu.com-20020104232022-330ad4iyzpvb5bm4
Tags: upstream-1.62
ImportĀ upstreamĀ versionĀ 1.62

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if(0)
 
2
  FTANGLE v1.60,
 
3
 created with UNIX on "Thursday, September 24, 1998 at 16:12." 
 
4
  COMMAND LINE: "./ftangle ./custom -uSUN -mVAX -mCC -= /u/krommes/Fweb/1.62/Boot/vax/custom.h -# -v"
 
5
  RUN TIME:     "Friday, September 25, 1998 at 8:03."
 
6
  WEB FILE:     "./custom.web"
 
7
  CHANGE FILE:  (none)
 
8
#endif
 
9
 
 
10
/* --- BOOTSTRAPPING --- */
 
11
 
 
12
/* To bootstrap yourself onto a new system, you should modify this file \
 
13
appropriately.  In most cases, you set a flag by saying ``#define \
 
14
FLAG''---i.e., you make a null definition.  Don't set these flags to~0 \
 
15
or~1.  However, in a few cases the macros are not flags and must be given \
 
16
the appropriate definition. */
 
17
 
 
18
/* --- MACHINE COMPILER FLAG --- */
 
19
 
 
20
/* This must be in lower case.  Presently these are drawn from the list \
 
21
{ansi, bsd, dsu, ibmpc, mac, misc, mvs, sgi, sun, vax}.  These \
 
22
flags may be used in #define statements within the source code to tailor \
 
23
things to a particular compiler or operating system.  If you use \
 
24
./configure to generate custom.h, there will be no definition following \
 
25
this comment. */
 
26
#ifndef vax
 
27
#define vax
 
28
#endif /* |vax| */
 
29
 
 
30
 
 
31
/* --- FWEB SYSTEM NAME --- */
 
32
 
 
33
/* This is a string such as ``IBM-PC/DOS'' or ``VAX/VMS''. It is printed \
 
34
when FWEB starts up. */
 
35
 
 
36
#define THE_SYSTEM  "VAX/VMS"
 
37
 
 
38
/* --- An optional local banner, printed after the system name above. --- */
 
39
 
 
40
#define LOCAL_BANNER ""
 
41
 
 
42
 
 
43
/* Does your compiler understand the ANSI preprocessor command \#error? \
 
44
If it does, define |HAVE_ERROR|.  (I haven't figured out a general \
 
45
autoconf test yet; it seems to be impossible in principle.) */
 
46
 
 
47
#define HAVE_ERROR 1
 
48
 
 
49
 
 
50
/* The C preprocessor is run by the \.{-H} option. */
 
51
 
 
52
#define RUN_CPP "gcc -E"
 
53
 
 
54
 
 
55
/* Occasionally a system command is issued to rename a file.  Here's how to \
 
56
do that. */
 
57
#define MV "mv"
 
58
 
 
59
 
 
60
/* Do we bother with translations to the internal |ASCII| representation? \
 
61
If so, define |TRANSLATE_ASCII|.  Don't bother on |ASCII| machines. */
 
62
 
 
63
#define TRANSLATE_ASCII 0
 
64
 
 
65
/* For \It{debugging} of target machines whose character set differs from \
 
66
the one on which you're working, define |DEBUG_XCHR|.  \It{Usually, this \
 
67
flag should not be defined.}  When it is defined, the |TRANSLATE_ASCII| \
 
68
flag is automatically turned on, and the value of the style-file field \
 
69
`xchr' is relevant. \It{Don't use this flag unless you're a system \
 
70
developer!!!} */
 
71
 
 
72
#define DEBUG_XCHR 0
 
73
 
 
74
/* Does the operating system have a Unix-like path? \
 
75
That is, does it have the form ``/u/krommes'' rather than the VMS form \
 
76
``ux3:[krommes]''?  If so, define |UNIX_PATH|. */
 
77
 
 
78
#define UNIX_PATH 0
 
79
 
 
80
 
 
81
/* If the |getenv| call to obtain an environment variable is supported \
 
82
(it usually is) define |HAVE_GETENV|. */
 
83
#define HAVE_GETENV 1
 
84
 
 
85
 
 
86
/* --- FILE NAMES and EXTENSIONS --- */
 
87
 
 
88
/* Name of the null file.  This macro merely defines the default value of \
 
89
the style-file parameter `null_file', so it's not essential to add any more \
 
90
machines here. */
 
91
 
 
92
#define NULL_FILE_NAME  "nl:"
 
93
 
 
94
/* Name of \FWEB's initialization file.  Please see below, after the \
 
95
definition of |SMALL_MEMORY|. */
 
96
 
 
97
/* Name of \FWEB's default style file.  \It{Please don't change this unless \
 
98
you absolutely have to!  Use the `-z' option instead.} */
 
99
 
 
100
#define STYLE_FILE_NAME "fweb.sty"
 
101
 
 
102
/* Here are the default file extensions for each language.  These merely \
 
103
set default style-file parameters, so it's not essential that you change \
 
104
anything here.  See the parameters `suffix.C', `suffix.N', etc. */
 
105
 
 
106
#define C_EXT "c"
 
107
#define V_EXT "mk"
 
108
#define X_EXT "sty"
 
109
 
 
110
/* Non-unix. */
 
111
#define Cpp_EXT "C"
 
112
#define R_EXT "rat"
 
113
#define R90_EXT "rat90"
 
114
#define N_EXT "for"
 
115
#define N90_EXT "for90"
 
116
 
 
117
#define HAVE_TMPNAM 1
 
118
#define HAVE_TEMPNAM 0
 
119
 
 
120
 
 
121
/* The |FANCY_SPLIT| flag is used for buffering the output lines of C~code. \
 
122
Define this if the C~compiler CAN'T continue an incomplete line with a \
 
123
backslash.  (ANSI compilers should be able to.) \
 
124
{\bf (This code may not be fully debugged yet!)} */
 
125
 
 
126
#define FANCY_SPLIT 1
 
127
 
 
128
 
 
129
/* --- INCLUDING FILES --- */
 
130
 
 
131
/* The code is written in C, and various header files of the form \
 
132
``<*.h>'' are included near the beginning of each source file.  The \
 
133
names of these files are standardized by ANSI.  Unfortunately, not everyone \
 
134
has gotten around to ANSI yet.  Therefore, here we include important files \
 
135
whose names may be nonstandard or whose functions may fluctuate. */
 
136
 
 
137
/* Does the ANSI <stdlib.h> exist?  If so, say so here.  This is supposed \
 
138
to contain prototypes for the following functions used by \FWEB: |abort|, \
 
139
|abs|, |atof|, |atoi|, |atol|, |calloc|, |exit|, |free|, |getenv|, \
 
140
|realloc|, |strtod|, |strtol|.  If it doesn't, either find the prototypes \
 
141
in another file and include it here, or actually give the prototypes here. */
 
142
 
 
143
#define HAVE_STDLIB_H 1
 
144
 
 
145
#define HAVE_STDARG_H 1
 
146
 
 
147
 
 
148
/* Does the ANSI <stddef.h> exist?  If so, include it here.  This is \
 
149
supposed to define the |NULL| pointer, and the type |size_t|.  Sometimes \
 
150
these are defined in other places as well. */
 
151
 
 
152
#define HAVE_STDDEF_H 1
 
153
 
 
154
/* Other stuff handled by autoconf. */
 
155
#define HAVE_STRING_H 1
 
156
 
 
157
#define HAVE_MEMORY_H 0
 
158
 
 
159
#define HAVE_FLOAT_H 1
 
160
 
 
161
/* Does (non-ANSI) <sys/types.h> exist?  You may find some useful stuff in \
 
162
here. But don't use it unless you have to. */
 
163
 
 
164
/*  _P include<sys/types.h> */
 
165
 
 
166
/* Must we include an extra file for memory management?  E.g., for \
 
167
Microsoft, <malloc.h>; for Borland; <alloc.h>.  Not necessary for ANSI; \
 
168
it's in <stdlib.h>. */
 
169
 
 
170
/*  _P include<malloc.h> */
 
171
 
 
172
/* Numerical limits.  We use the following ANSI macros: |INT_MAX|, \
 
173
|INT_MIN|, |LONG_MAX|, |LONG_MIN|, and |ULONG_MAX|, which are found in \
 
174
<limits.h>. If you can't find those macros, define the flag \
 
175
|HAVE_VALUES_H|, and possibly include another file with different names for \
 
176
the limits, such as <values.h> on the Sun.  The flag |HAVE_VALUES_H| \
 
177
assumes that the macros |MAXINT| and |MAXLONG| are defined.  If they are \
 
178
not, you must define them here. */
 
179
 
 
180
#define HAVE_LIMITS_H 1
 
181
#define HAVE_VALUES_H 0
 
182
 
 
183
/* Please note that additional files are included automatically \
 
184
(essentially immediately after this file is read; see <includes.hweb>). \
 
185
These were considered to be standard, but that might be a mistake.  Those \
 
186
files are: <string.h>, <stdio.h>, <ctype.h>, <setjmp.h>, <time.h>. \
 
187
Remember that by convention these files should limit themselves to being \
 
188
included only once.  Therefore, if for some reason you need to include one \
 
189
of these somewhere in this file, you should be able to do it without \
 
190
difficulty; the later automatic include just won't be done if those files \
 
191
are following standard protocol. */
 
192
 
 
193
#define ANSI_CTYPE_H 0
 
194
 
 
195
 
 
196
/* --- VARIABLE-LENGTH ARGUMENT LISTS --- */
 
197
 
 
198
/* For convenience, FWEB attempts to use functions with variable numbers of \
 
199
arguments.  We attempt to support two conventions: ANSI, and Sun's.  If \
 
200
this feature is supported, define the flag |VARIABLE_ARGUMENTS|, say \
 
201
whether |va_start| has one or two arguments, and include the associated \
 
202
header file (<stdarg.h> for ANSI). */
 
203
 
 
204
/* Does the compiler allow ANSI-style variable arguments? */
 
205
 
 
206
#define VARIABLE_ARGUMENTS 1
 
207
 
 
208
/* Is |va_start| defined with one argument (Sun's convention) or two \
 
209
(ANSI)? */
 
210
#define NUM_VA_ARGS 2
 
211
#define HAVE_STDARG_H 1
 
212
 
 
213
 
 
214
/* --- ADDITIONAL PROTOTYPES --- */
 
215
 
 
216
/* You may wish to collect any additional prototypes that are required and \
 
217
put them into your own header file that you include here. */
 
218
 
 
219
/* If the flag |HAVE_STD_PROTOTYPES| is false, it causes the file \
 
220
"stdlib0.h" to be loaded.  This contains ANSI prototypes that for some \
 
221
reason aren't provided with the gcc environment on the Sun. */
 
222
#define HAVE_STD_PROTOTYPES 1
 
223
 
 
224
 
 
225
/* Define the flag |OLD_PROTOTYPES| for compilers that don't support the \
 
226
new (ANSI) style of function declaration and prototyping.  The new style is \
 
227
|fcn(int i,char *s){}|; the old style is |fcn(i,s) int i; char *s; {}|. */
 
228
 
 
229
#define OLD_PROTOTYPES 1
 
230
 
 
231
/* ANSI also introduces the type |void|.  If your compiler doesn't \
 
232
understand the constructions |void *| and |void fcn()|, define |NO_VOID|. */
 
233
 
 
234
#define NO_VOID 0
 
235
 
 
236
 
 
237
/* --- SPECIAL TYPES --- */
 
238
 
 
239
/* |const| seems to be an annoyance; not all compilers treat it the same \
 
240
way.  We really only want it for debugging, anyway, so we mostly just \
 
241
remove it.  It's kept when compiling on the Sun with gcc, because it \
 
242
gives the developer more checks on the code.  If you want to keep it, \
 
243
define |KEEP_CONST|. */
 
244
 
 
245
#define KEEP_CONST 0
 
246
 
 
247
/* For personal computers, the kind of pointer is an issue.  They must be \
 
248
|huge|.  If your compiler understands |huge|, define |HUGE_POINTERS|. */
 
249
 
 
250
#define HUGE_POINTERS 0
 
251
 
 
252
 
 
253
/* --- SPECIAL FUNCTIONS --- */
 
254
 
 
255
/* The ANSI |sprintf| function returns the number of characters written. \
 
256
If this is the case on your system, define |ANSI_SPRINTF|.  (It's always \
 
257
safe to not define it.) */
 
258
 
 
259
#define ANSI_SPRINTF 1
 
260
 
 
261
/* The ANSI |sscanf| does some cute things with scansets, but it doesn't \
 
262
always work. */
 
263
#define ANSI_SSCANF 0
 
264
 
 
265
/* The ANSI |system| function is supposed to take |NULL| as an argument, \
 
266
which means check if a command processor exists.  If this works properly, \
 
267
defined |ANSI_SYSTEM|.  (It doesn't work on the Sun.) */
 
268
 
 
269
#define ANSI_SYSTEM 0
 
270
 
 
271
 
 
272
/* --- ANNOYING WARNINGS --- */
 
273
 
 
274
/* Sometimes the compiler can't understand that the \
 
275
control flow can never get to the bottom of a function. To avoid warning \
 
276
complaints, we have the following: */
 
277
 
 
278
#define DUMMY_RETURN(value) return value
 
279
 
 
280
 
 
281
/* --- UNUSUAL NAMES --- */
 
282
 
 
283
/* Put here any definitions that override standard names.  For example, for \
 
284
some ancient on the MAC one had to say ``#define getc agetc''. */
 
285
 
 
286
/* Nothing to be done. */
 
287
 
 
288
 
 
289
/* --- DIRECTORY SPECIFICATIONS --- */
 
290
 
 
291
/* Directory specifications are delimited in different ways under the various \
 
292
operating systems. Unix: '/'; IBM-PC: '\\'; VAX/VMS: ']'. */
 
293
 
 
294
#define PREFIX_END_CHAR ']' /* The VAX has a peculiar format. */
 
295
 
 
296
 
 
297
/* --- TIMING --- */
 
298
 
 
299
/* First of all, we have a flag to say whether timing information is \
 
300
printed at the end of the run.  (If you can't figure out the timing \
 
301
routines for your machine or don't want a timing information line at the \
 
302
end of your terminal output, don't define this.)  Beginning with fweb-1.53, \
 
303
timing is turned off by default. */
 
304
 
 
305
#define TIMING 0
 
306
 
 
307
/* --- Number of decimal places  for timing information in seconds.  (Use \
 
308
at least 2 for supercomputers.) --- */
 
309
 
 
310
#define TIMING_WIDTH 1
 
311
 
 
312
/* There's supposed to be a function |clock()| that returns the cpu time, \
 
313
in units of |CLOCKS_PER_SEC|.  The type of |clock| is |clock_t|.  If that \
 
314
is defined, define the flag |CLOCK_T_DEFINED|; otherwise, say |typedef ... \
 
315
clock_t| here. */
 
316
 
 
317
#define CLOCK_T_DEFINED 1
 
318
 
 
319
/* Some systems don't define |CLOCKS_PER_SEC|.  If not, we try |CLK_TCK|. \
 
320
If that's not defined, it defaults to 1000000.  If that's not appropriate, \
 
321
define |CLOCKS_PER_SEC| here. */
 
322
 
 
323
/* \
 
324
#define CLOCKS_PER_SEC 1000000 \
 
325
*/
 
326
 
 
327
/* Are there system routines that return wall-clock time in sub-second units? \
 
328
First, look for |gettimeofday| ($\mu$sec timing). */
 
329
#define HAVE_GETTIMEOFDAY 0
 
330
 
 
331
/* Otherwise, does the file sys/timeb.h exist that along with |ftime| gives \
 
332
millisecond timing for wall-clock time?  We check for the header file, not \
 
333
|ftime| itself, since |ftime| may be in a Berkeley compatibility library, \
 
334
not in libc. */
 
335
 
 
336
#define HAVE_SYS_TIMEB_H 0
 
337
 
 
338
/* Do we use our own version of |difftime()|, which computes the difference \
 
339
of two wall clock times?  If so, define |NEW_DIFFTIME|.  This flag should \
 
340
always be defined if |HAVE_SYS_TIMEB_H| is defined above.  */
 
341
 
 
342
#define NEW_DIFFTIME 0
 
343
 
 
344
 
 
345
/* --- MAKING IT FIT --- */
 
346
 
 
347
/* Sometimes the compiler can't handle functions or switches that are too \
 
348
large.  In that case, define |FCN_CALLS|.  That converts certain in-line \
 
349
code (such as in the syntax production analyzer) into function calls (at \
 
350
the price of slowing things down a bit). */
 
351
 
 
352
#define FCN_CALLS 0
 
353
 
 
354
/* The personal computers are starved for memory.  For those machines, we \
 
355
specify smaller default values for the lengths of dynamic arrays; define \
 
356
|SMALL_MEMORY|.  (You can always use the `-y' option to override these \
 
357
defaults.) */
 
358
 
 
359
#define SMALL_MEMORY 0
 
360
 
 
361
/* Name of \FWEB's default initialization file.  Please don't change these \
 
362
conventions unless you absolutely have to!!!  Also, note that these \
 
363
definitions are overridden by the environment variable |FWEB_INI|, if it is \
 
364
defined. */
 
365
 
 
366
#ifndef SMALL_MEMORY
 
367
#define SMALL_MEMORY 0
 
368
#endif
 
369
 
 
370
#if SMALL_MEMORY
 
371
#define FWEB_INI "fweb.ini"
 
372
#else
 
373
#define FWEB_INI ".fweb"
 
374
#endif
 
375
 
 
376
 
 
377
/* --- MEMORY ALLOCATIONS --- */
 
378
 
 
379
/* The ANSI |calloc| routine takes two arguments:  |void \
 
380
*calloc(size_t,size_t)|. If the system doesn't have a standard |calloc| \
 
381
routine, or if the name isn't standard, you must define an UPPERCASE macro \
 
382
that does the same thing.  (The name isn't standard on personal computers \
 
383
because one is dealing with |huge| allocations.)  If you define \
 
384
|NON_ANSI_CALLOC|, you must define |CALLOC|, |REALLOC|, and |FREE|.  E.g., the \
 
385
relevant definitions for Borland are \
 
386
\begintt \
 
387
#define CALLOC farcalloc \
 
388
#define REALLOC(oldblock,nbytes) \ \
 
389
 farrealloc((void far *)(oldblock),(unsigned long)(nbytes)) \
 
390
#define FREE(block) farfree((void far *)(block)) \
 
391
\endtt \
 
392
*/
 
393
 
 
394
#define NON_ANSI_CALLOC 0
 
395
 
 
396
/* |IBMPC| */
 
397
 
 
398
/* Do we supply below a routine that obtains the available memory, such \
 
399
as Borland's farcoreleft()? */
 
400
 
 
401
#define PRINT_AVAILABLE_MEMORY 0
 
402
 
 
403
/* The function call that obtains the memory is called |CORE_LEFT|.  This \
 
404
function is assumed to return an |unsigned long int|.  For Microsoft, we had \
 
405
to write our own routine |_hmemavl|; see below.  For Borland, the routine \
 
406
should be called |farcoreleft|.  For the other machines, we don't have \
 
407
anything as yet. */
 
408
 
 
409
 
 
410
 
 
411
 
 
412
/* The following flag is defined only by \common.web}. */
 
413
#ifdef COMMON_FCNS_
 
414
#if(part==0 || part==1)
 
415
 
 
416
/* Give here the C code for any additional functions that are \
 
417
compiler-specific or missing from your implementation, such as maybe \
 
418
|strtod|.  Note that these are bracketed with the flag COMMON_FCNS_ so they \
 
419
are compiled into just one module, namely common.c. You must \
 
420
always supply some version of the debugging routine |trap|, which must \
 
421
return~0 as a minimum. */
 
422
 
 
423
 
 
424
/* The default |trap| function for debugging. */
 
425
int trap(void)
 
426
{return 0;}
 
427
 
 
428
#endif /* |part == 1| */
 
429
 
 
430
#endif /* |COMMON_FCNS_| */
 
431
 
 
432