beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luatex.h
blob8b1254dcbff56ff4d23523e0a7e62c4f78dc3213
1 /* luatex.h
3 Copyright 1996-2006 Han The Thanh <thanh@pdftex.org>
4 Copyright 2006-2013 Taco Hoekwater <taco@luatex.org>
6 This file is part of LuaTeX.
8 LuaTeX is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your
11 option) any later version.
13 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License along
19 with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
22 #ifndef LUATEX_H
23 # define LUATEX_H
25 /* texmf.h: Main include file for TeX and Metafont in C. This file is
26 included by {tex,mf}d.h, which is the first include in the C files
27 output by web2c. */
29 # include "cpascal.h"
31 # include <kpathsea/c-pathch.h> /* for IS_DIR_SEP, used in the change files */
32 # include <kpathsea/tex-make.h> /* for kpse_make_tex_discard_errors */
34 /* If we have these macros, use them, as they provide a better guide to
35 the endianess when cross-compiling. */
36 # if defined (BYTE_ORDER) && defined (BIG_ENDIAN) && defined (LITTLE_ENDIAN)
37 # ifdef WORDS_BIGENDIAN
38 # undef WORDS_BIGENDIAN
39 # endif
40 # if BYTE_ORDER == BIG_ENDIAN
41 # define WORDS_BIGENDIAN
42 # endif
43 # endif
44 /* More of the same, but now NeXT-specific. */
45 # ifdef NeXT
46 # ifdef WORDS_BIGENDIAN
47 # undef WORDS_BIGENDIAN
48 # endif
49 # ifdef __BIG_ENDIAN__
50 # define WORDS_BIGENDIAN
51 # endif
52 # endif
55 /* Some things are the same except for the name. */
57 # define TEXMFPOOLNAME "luatex.pool"
58 # define TEXMFENGINENAME "luatex"
60 # define DUMP_FILE fmt_file
61 # define DUMP_FORMAT kpse_fmt_format
62 # define write_dvi WRITE_OUT
63 # define flush_dvi flush_out
64 # define OUT_FILE dvi_file
65 # define OUT_BUF dvi_buf
67 /* Restore underscores. */
68 # define kpsetexformat kpse_tex_format
69 # define t_open_in topenin
71 /* Executing shell commands. */
72 extern void mk_shellcmdlist(char *);
73 extern void init_shell_escape(void);
74 extern int shell_cmd_is_allowed(const char *cmd, char **safecmd,
75 char **cmdname);
78 #if defined(WIN32) && !defined(__MINGW32__) && defined(DLLPROC)
79 extern __declspec(dllexport) int DLLPROC (int ac, string *av);
80 #else
81 #undef DLLPROC
82 #endif
84 # ifndef GLUERATIO_TYPE
85 # define GLUERATIO_TYPE double
86 # endif
87 typedef GLUERATIO_TYPE glueratio;
89 # if defined(__DJGPP__) && defined (IPC)
90 # undef IPC
91 # endif
93 # ifdef IPC
94 extern void ipcpage(int);
95 # endif /* IPC */
98 # define flush_out() fflush (OUT_FILE)
100 /* Read a line of input as quickly as possible. */
101 # define input_ln(stream, flag) input_line (stream)
103 extern boolean input_line(FILE *);
105 # define COPYRIGHT_HOLDER "Taco Hoekwater"
106 # define AUTHOR NULL
107 # define PROGRAM_HELP LUATEXHELP
108 # define BUG_ADDRESS "dev-luatex@ntg.nl"
109 # define DUMP_OPTION "fmt"
110 # define DUMP_EXT ".fmt"
111 # define INPUT_FORMAT kpse_tex_format
112 # define INI_PROGRAM "luainitex"
113 # define VIR_PROGRAM "luavirtex"
114 # define TEXMFENGINENAME "luatex"
116 /* this counteracts the macro definition in cpascal.h */
117 # undef Xchr
118 # define Xchr(a) a
120 #endif