| 1 |
/* luatex.h |
| 2 |
|
| 3 |
Copyright 1996-2006 Han The Thanh <[email protected]> |
| 4 |
Copyright 2006-2013 Taco Hoekwater <[email protected]> |
| 5 |
|
| 6 |
This file is part of LuaTeX. |
| 7 |
|
| 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. |
| 12 |
|
| 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. |
| 17 |
|
| 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/>. */ |
| 20 |
|
| 21 |
|
| 22 |
#ifndef LUATEX_H |
| 23 |
# define LUATEX_H |
| 24 |
|
| 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. */ |
| 28 |
|
| 29 |
# include "cpascal.h" |
| 30 |
|
| 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 */ |
| 33 |
|
| 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 |
| 53 |
|
| 54 |
|
| 55 |
/* Some things are the same except for the name. */ |
| 56 |
|
| 57 |
# define TEXMFPOOLNAME "luatex.pool" |
| 58 |
# define TEXMFENGINENAME "luatex" |
| 59 |
|
| 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 |
| 66 |
|
| 67 |
/* Restore underscores. */ |
| 68 |
# define kpsetexformat kpse_tex_format |
| 69 |
# define t_open_in topenin |
| 70 |
|
| 71 |
/* Executing shell commands. */ |
| 72 |
extern void mk_shellcmdlist(char *); |
| 73 |
extern void init_shell_escape(void); |
| 74 |
extern void init_start_time(void); |
| 75 |
extern int get_start_time(void); |
| 76 |
extern void set_start_time(int); |
| 77 |
extern boolean get_start_time(void); |
| 78 |
|
| 79 |
extern int shell_cmd_is_allowed(const char *cmd, char **safecmd, |
| 80 |
char **cmdname); |
| 81 |
|
| 82 |
|
| 83 |
#if defined(WIN32) && !defined(__MINGW32__) && defined(DLLPROC) |
| 84 |
extern __declspec(dllexport) int DLLPROC (int ac, string *av); |
| 85 |
#else |
| 86 |
#undef DLLPROC |
| 87 |
#endif |
| 88 |
|
| 89 |
# ifndef GLUERATIO_TYPE |
| 90 |
# define GLUERATIO_TYPE double |
| 91 |
# endif |
| 92 |
typedef GLUERATIO_TYPE glueratio; |
| 93 |
|
| 94 |
# if defined(__DJGPP__) && defined (IPC) |
| 95 |
# undef IPC |
| 96 |
# endif |
| 97 |
|
| 98 |
# ifdef IPC |
| 99 |
extern void ipcpage(int); |
| 100 |
# endif /* IPC */ |
| 101 |
|
| 102 |
|
| 103 |
# define flush_out() fflush (OUT_FILE) |
| 104 |
|
| 105 |
/* Read a line of input as quickly as possible. */ |
| 106 |
# define input_ln(stream, flag) input_line (stream) |
| 107 |
|
| 108 |
extern boolean input_line(FILE *); |
| 109 |
|
| 110 |
# define COPYRIGHT_HOLDER "Taco Hoekwater" |
| 111 |
# define AUTHOR NULL |
| 112 |
# define PROGRAM_HELP LUATEXHELP |
| 113 |
# define BUG_ADDRESS "[email protected]" |
| 114 |
# define DUMP_OPTION "fmt" |
| 115 |
# define DUMP_EXT ".fmt" |
| 116 |
# define INPUT_FORMAT kpse_tex_format |
| 117 |
# define INI_PROGRAM "luainitex" |
| 118 |
# define VIR_PROGRAM "luavirtex" |
| 119 |
# define TEXMFENGINENAME "luatex" |
| 120 |
|
| 121 |
/* this counteracts the macro definition in cpascal.h */ |
| 122 |
# undef Xchr |
| 123 |
# define Xchr(a) a |
| 124 |
|
| 125 |
#endif |