w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

config.h
Go to the documentation of this file.
1 /* $Id: config.h,v 2.1 1996/05/20 11:05:07 neumann Exp $ */
2 
3 /* gcc -ansi doesn't predefine `unix', since ANSI forbids it. And AIX
4  generally doesn't predefine unix, who knows why. HP-UX is, of course,
5  also different. Apple's MacOsX is also unix-like. */
6 #ifndef unix
7 #if defined (__unix__) || defined (_AIX) || defined (_HPUX_SOURCE)
8 #define unix
9 #elif defined (__APPLE__) && defined (__MACH__)
10 #define unix
11 #elif defined (__NetBSD__)
12 #define unix
13 #endif
14 #endif
15 
16 #define USEPXL
17 
18 #ifdef __riscos
19 /* #define RISC_USE_OSL */ /* use file functions of OSlib */
20 /* #define RISC_BUFFER */ /* buffer output */
21 #endif
22 
23 /*
24  * default font path
25  * can be overridden by environment variable TEXPXL
26  * or -a command line option
27  * popular choice:
28  * #define FONTAREA "/usr/local/lib/tex/fonts/pk"
29  */
30 #ifndef FONTAREA
31 # ifdef __riscos
32 # define FONTAREA "TeXFonts:"
33 # else
34 # ifdef vms
35 # define FONTAREA "tex$pkdir:"
36 # else
37 # ifdef _AMIGA
38 # define FONTAREA "TeXMF:pk"
39 # else
40 # define FONTAREA "/usr/local/lib/tex/fonts/pk"
41 # endif
42 # endif
43 # endif
44 #endif
45 
46 /* if DO_SUBDIRECTORIES is specified, search to this depth */
47 #ifndef MAX_SUBDIR_SEARCH_DEPTH
48 #define MAX_SUBDIR_SEARCH_DEPTH 10
49 #endif
50 
51 /*
52  * if your LaserJet II P or LaserJet III or LaserJet 2000
53  * complains about not enough memory, you might try to reduce
54  * the value below or uncomment to use the default settings
55  */
56 #if defined (LJ2P) || defined (LJ4)
57 #define MAX_FONTS_PER_PAGE 255 /* maximum number of fonts per page */
58 #endif
59 
60 
61 /* Timing is not very portable.... if you have troubles, use
62  * -DNO_TIMING in the Makefile
63  */
64 
65 #ifdef u3b2
66 #define NO_TIMING
67 #endif
68 #ifdef _AMIGA
69 #define NO_TIMING
70 #endif
71 #ifdef KPATHSEA
72 #define NO_TIMING
73 #define MAKETEXPK
74 #endif
75 #ifdef __riscos
76 #define NO_TIMING
77 #endif
78 
79 #ifndef NO_TIMING
80 #define TIMING
81 #endif
82 
83 /*
84  * per default use mktexpk in unix environments unless it is not wanted
85  */
86 #ifdef unix
87 #ifndef MAKETEXPK
88 /* name of the program which is called to generate missing pk files
89  */
90 #define MAKETEXPK "mktexpk"
91 #endif
92 #endif
93 
94 #ifdef _AMIGA
95 #ifndef MAKETEXPK
96 /* name of the program which is called to generate missing pk files
97  */
98 #define MAKETEXPK "mktexpk"
99 #endif
100 #endif
101 
102 #ifdef __riscos
103 #ifndef MAKETEXPK
104 #define MAKETEXPK "mktexpk"
105 #endif
106 #endif
107 
108 #ifdef NO_MAKETEXPK
109 #undef MAKETEXPK
110 #endif
111 
112 /*
113  * assure that LJ2P is defined when LJ4 is defined;
114  * compile with support for LJ4's resident fonts
115  */
116 #ifdef LJ4
117 #define LJ2P
118 #define LJ_RESIDENT_FONTS
119 #endif
120 
121 /*
122  * assure that LJ2 is defined when LJ2P is defined
123  */
124 #ifdef LJ2P
125 #ifndef LJ2
126 #define LJ2
127 #endif
128 #endif
129 
130 /*
131  * assure that LJ is defined when LJ2 of LJ4 is defined
132  */
133 #if defined(LJ2)
134 #ifndef LJ
135 #define LJ
136 #endif
137 #endif
138 
139 /*
140  * assure that IBM3812 is not defined when LJ is defined
141  */
142 #ifdef LJ
143 #ifdef IBM3812
144 #undef IBM3812
145 #endif
146 #endif
147 
148 #ifdef LJ_RESIDENT_FONTS
149 # ifndef DEFAULT_TFM_PATH
150 # ifdef __riscos
151 # define FONTAREA "TeXFonts:"
152 # else
153 # define DEFAULT_TFM_PATH "/usr/local/lib/tex/fonts"
154 # endif
155 # endif
156 #endif
157 
158 
159 #define _TRUE (bool) 1
160 #define _FALSE (bool) 0
161 #define UNKNOWN -1
162 
163 #define STRSIZE 255 /* stringsize for file specifications */
164 
165 
166 #ifdef __riscos
167 # ifndef types_H /* for compatibility with OSLib */
168 typedef int bool;
169 # endif
170 #else
171 typedef char bool;
172 #endif
173 
174 
175 /* The smallest signed type: use `signed char' if ANSI C, `short' if
176  char is unsigned, otherwise `char'. */
177 #ifndef SCHAR_TYPE
178 #if __STDC__
179 #define SCHAR_TYPE signed char
180 #else /* not __STDC */
181 #ifdef __CHAR_UNSIGNED__
182 #define SCHAR_TYPE short
183 #else
184 #define SCHAR_TYPE char
185 #endif
186 #endif /* not __STDC__ */
187 #endif /* not SCHAR_TYPE */
189 
190 #if !defined(u3b2) && !defined(LONG_64_BITS)
191 #define ARITHMETIC_RIGHT_SHIFT
192 #endif
193 
194 #ifndef SIZEOF_LONG
195 # ifdef __riscos
196 # define SIZEOF_LONG 8
197 # endif
198 #endif
199 
200 #if SIZEOF_LONG > 4
201 # define long4 int
202 # define FMT_long4 "%d"
203 #else
204 # define long4 long
205 # define FMT_long4 "%ld"
206 #endif
207 
208 #include <stdarg.h>
209 
210 #ifndef KPATHSEA
211 #error "Would need changed findfile, dviljk has changed allocation semantic of name member in tfontptr"
212 #endif
213 
214 
215 /*
216  * maximal number of characters in font file
217  * #define LASTFNTCHAR 127 7-bit classic version
218  * #define LASTFNTCHAR 255 8-bit fonts
219  */
220 #ifdef SEVENBIT
221 # define LASTFNTCHAR 127
222 #else
223 # define LASTFNTCHAR 255
224 #endif
225 
226 
227 
228 /* this information is needed in findfile.c and dvi2xx.c, NO CUSTOMIZATION */
229 #ifdef LJ
230 # ifndef MFMODE300
231 # define MFMODE300 "cx" /* mode definition for metafont 300dpi */
232 # endif
233 # ifdef LJ4
234 # ifndef MFMODE600
235 # define MFMODE600 "ljfour" /* mode definition for metafont 600dpi */
236 # endif
237 # else
238 # define MFMODE MFMODE300 /* default mode */
239 # endif
240 #endif
241 
242 #ifdef IBM3812
243 #define RESOLUTION 240
244 #ifndef MFMODE
245 #define MFMODE "IBMThreeEightOneTwo" /* mode definition for metafont */
246 #endif
247 #endif
248 
249 #if defined (unix) && !defined (__DJGPP__)
250 #define OS "Unix"
251 #define READ_BINARY "r"
252 #define WRITE_BINARY "w"
253 #ifndef labs
254 #define labs(x) abs(x)
255 #endif
256 #endif
257 
258 #ifdef MSDOS
259 # define OS "MS-DOS"
260 # define READ_BINARY "rb"
261 # define WRITE_BINARY "wb"
262 # ifdef __DJGPP__
263 # include <io.h> /* for prototype of `setmode' */
264 # define AssureBinary(f) setmode((f), O_BINARY)
265 # else
266 # define MSC5 /* assume Microsoft C */
267 # endif
268 #endif
269 #ifdef OS2
270 #define OS "OS/2"
271 #define READ_BINARY "rb"
272 #define WRITE_BINARY "wb"
273 #define MSC5
274 #endif
275 #ifdef WIN32
276 #define OS "Win32"
277 #define READ_BINARY "rb"
278 #define WRITE_BINARY "wb"
279 # include <io.h> /* for prototype of `_setmode' */
280 # define AssureBinary(f) _setmode((f), _O_BINARY)
281 #define MSC10
282 #endif
283 
284 #ifdef vms
285 #define OS "VMS"
286 #include <ssdef.h>
287 #include <stsdef.h>
288 #define ftell vms_ftell /* use some external routines, because */
289 #define fseek vms_fseek /* of some bugs in the VMS run time */
290 #define getchar vms_getchar /* library */
291 #define getenv vms_getenv
292 #define ungetc vms_ungetc
293 #define getname vms_getname
294 #define READ_BINARY "rb"
295 #define WRITE_BINARY "wb","rfm=fix","bls=512","mrs=512" /* fixed records */
296 #define labs(x) abs(x)
297 #endif
298 
299 #ifdef _AMIGA
300 #define OS "Amiga"
301 #define READ_BINARY "r"
302 #define WRITE_BINARY "w"
303 #ifdef __SASC
304 #define sys_errlist __sys_errlist
305 #include <stdlib.h>
306 #endif
307 #endif
308 
309 #ifdef unix
310 # include <stdio.h>
311 #endif
312 
313 #ifdef HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif
316 
317 #ifdef __riscos
318 # define OS "RISC OS"
319 # ifdef RISC_USE_OSL
320 # define READ_BINARY 0x43 /* if using fopen stuff reset to "rb", "wb" */
321 # define WRITE_BINARY 0x83
322 # else
323 # define READ_BINARY "rb"
324 # define WRITE_BINARY "wb"
325 # endif
326 # define ERR_STREAM stdout /* ???? */
327 # else
328 # define ERR_STREAM stderr
329 #endif
330 
331 /*
332 #ifndef TRUE
333 #define TRUE 1
334 #endif
335 #ifndef FALSE
336 #define FALSE 0
337 #endif
338 */
339 
340 #ifdef KPATHSEA
341 #define BOPENCMD xfopen
342 #else
343 #define BOPENCMD fopen /* ???? */
344 #endif
345 
346 /* Set up file stuff */
347 #ifdef RISC_USE_OSL
348 #include "fromosl.h"
349 typedef os_f FILEPTR;
350 #define read_byte(fp,char) os_bget(fp,&char)
351 #define write_byte(fp,char) os_bput(char,fp)
352 #define read_multi(buf,n,s,fp) osgbpb_read(fp,(byte*)buf,(s)*(n))
353 #define write_multi(buf,n,s,fp) osgbpb_write(fp,(byte*)buf,(s)*(n))
354 #define BINOPEN(f) osfind_openin(READ_BINARY,f,NULL)
355 #define BOUTOPEN(f) osfind_openout(WRITE_BINARY,f,NULL)
356 #define BCLOSE(f) osfind_close(f)
357 #define FEOF(f) osargs_read_eof_status(f)
358 #define FSEEK(f,pos,whence) os_seek(f,pos,whence)
359 #define FTELL(f) osargs_read_ptr(f)
360 #define FPNULL 0
361 #else
362 typedef FILE *FILEPTR;
363 #define read_byte(fp,char) char = fgetc(fp)
364 #define write_byte(fp,char) fputc(char,fp)
365 #define read_multi(buf,n,s,fp) fread(buf,n,s,fp)
366 #define write_multi(buf,n,s,fp) fwrite(buf,n,s,fp)
367 #define BINOPEN(f) BOPENCMD(f,READ_BINARY)
368 #define BOUTOPEN(f) BOPENCMD(f,WRITE_BINARY)
369 #define BCLOSE(f) fclose(f)
370 #define FEOF(f) feof(f)
371 #define FSEEK(f,pos,whence) fseek(f,pos,whence)
372 #define FTELL(f) ftell(f)
373 #define FPNULL NULL
374 #endif
375 
376 
377 #define BUFFSIZE 8192 /* ???? */
378 
379 #ifndef SEEK_SET
380 # define SEEK_SET 0
381 #endif
382 #ifndef SEEK_CUR
383 # define SEEK_CUR 1
384 #endif
385 #ifndef SEEK_END
386 # define SEEK_END 2
387 #endif
388 
389 #ifndef O_BINARY
390 # ifdef _O_BINARY
391 # define O_BINARY _O_BINARY
392 # else
393 # define O_BINARY 0
394 #endif
395 #endif
396 
397 #if !defined (AssureBinary) && !defined (MSC5)
398 # define AssureBinary(f) 0
399 #endif
400 
401 #ifndef HAVE_VPRINTF
402 #ifdef HAVE_DOPRNT
403 #define vfprintf(stream, message, args) _doprnt(message, args, stream)
404 /* If we have neither, should fall back to fprintf with fixed args. */
405 #endif
406 #endif
407 
408 /* If unlink and rmdir are not there, we don't delete the temporary files. */
409 #ifndef HAVE_RMDIR
410 #define rmdir(dir)
411 #endif
412 #ifndef HAVE_UNLINK
413 #define unlink(file)
414 #endif
415 
416 /* If mkdtemp() does not exist, we have to use mktemp() or tmpnam()
417  and mkdir(). For the latter, we need the declaration. */
418 #ifndef HAVE_MKDTEMP
419 #include <sys/types.h>
420 #include <sys/stat.h>
421 #endif
422 
423 #ifndef KPATHSEA
424 /* FIXME: Should provide a strdup function. But currently this tree is
425  only used in connection with kpathsea anyhow. */
426 #error "Need xstrdup and xmalloc function, e.g. from kpathsea"
427 #endif
#define SCHAR_TYPE
Definition: config.h:184
char signed_char
Definition: config.h:188
FILE * FILEPTR
Definition: config.h:362
char bool
Definition: config.h:171
byte os_f
Definition: tif_acorn.c:85
#define FILE
Definition: t1stdio.h:34