OSDN Git Service

get rid of tex.pool.
[putex/putex.git] / src / texsourc / common.h
1 /* common.h: Definitions and declarations common both to the change
2    files and to web2c itself.  This is included from config.h, which
3    everyone includes. 
4
5    Copyright 1992 Karl Berry
6    Copyright 2007 TeX Users Group
7    Copyright 2014 Clerk Ma
8
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.
13
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.
18
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
22    02110-1301 USA.  */
23
24 #ifndef COMMON_H
25 #define COMMON_H
26
27 #include "getopt.h"
28 #include "lib.h"
29 #include "ourpaths.h"
30 #include "pascal.h"
31 #include "types.h"
32
33
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
36    sources.  */
37 #ifdef link
38   #undef link
39 #endif
40 //#define link link_var
41
42
43 /* On VMS, `exit (1)' is success.  */
44 #ifndef EXIT_SUCCESS_CODE
45   #ifdef VMS
46     #define EXIT_SUCCESS_CODE 1
47   #else
48     #define EXIT_SUCCESS_CODE 0
49   #endif
50 #endif /* not EXIT_SUCCESS_CODE */
51
52 /* Some features are only needed in certain programs.  */
53
54 #ifdef TeX
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
65    trip/trap tests.
66    
67    This type is set automatically to `float' by configure if a small TeX
68    is built.  */
69 #ifndef GLUERATIO_TYPE
70   #define GLUERATIO_TYPE double
71 #endif
72   typedef GLUERATIO_TYPE glueratio;
73 #endif
74 \f
75 /* Declarations for the routines we provide ourselves.  */
76
77 extern integer zround (double);                 /* extern integer zround(); */
78
79 /* File routines.  */
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 */
86
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;
92 extern char *version;
93
94 #endif /* not COMMON_H */