1 /* common.h: Definitions and declarations common both to the change
2 files and to web2c itself. This is included from config.h, which
5 Copyright 1992 Karl Berry
6 Copyright 2007 TeX Users Group
7 Copyright 2014 Clerk Ma
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
34 /* We never need the `link' system call, which is sometimes declared in
35 <unistd.h>, but we do have lots of variables called `link' in the web
40 //#define link link_var
43 /* On VMS, `exit (1)' is success. */
44 #ifndef EXIT_SUCCESS_CODE
46 #define EXIT_SUCCESS_CODE 1
48 #define EXIT_SUCCESS_CODE 0
50 #endif /* not EXIT_SUCCESS_CODE */
52 /* Some features are only needed in certain programs. */
55 /* The type `glueratio' should be a floating point type which won't
56 unnecessarily increase the size of the memory_word structure. This is
57 the basic requirement. On most machines, if you're building a
58 normal-sized TeX, then glueratio must probably meet the following
59 restriction: sizeof(glueratio) <= sizeof(integer). Usually, then,
60 glueratio must be `float'. But if you build a big TeX, you can (on
61 most machines) and should make it `double' to avoid loss of precision
62 and conversions to and from double during calculations. (All this
63 also goes for Metafont.) Furthermore, if you have enough memory, it
64 won't hurt to have this defined to be `double' for running the
67 This type is set automatically to `float' by configure if a small TeX
69 #ifndef GLUERATIO_TYPE
70 #define GLUERATIO_TYPE double
72 typedef GLUERATIO_TYPE glueratio;
75 /* Declarations for the routines we provide ourselves. */
77 extern integer zround (double); /* extern integer zround(); */
80 extern bool test_eof (FILE * file);
81 extern bool eoln (FILE * file);
82 extern bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode);
83 extern bool open_output (FILE **f, char *fopen_mode);
84 extern void set_paths (int path_bits);
85 extern int check_fclose (FILE * f); /* in openinou.c 93/Nov/20 */
87 /* Argument handling, etc. */
88 /* extern int argc; */
89 /* extern char **gargv; */
90 extern void argv(); /* only to prevent accidental use of argv[] ??? */
91 extern char *versionstring;
94 #endif /* not COMMON_H */