OSDN Git Service

store_new_token, fast_get_avail and fast_store_new_token.
[putex/putex.git] / src / texsourc / yandytex.h
1 /* Copyright 2014 Clerk Ma
2
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 2 of the License, or
6    (at your option) any later version.
7
8    This program is distributed in the hope that it will be useful, but
9    WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11    General Public License for more details.
12
13    You should have received a copy of the GNU General Public License
14    along with this program; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16    02110-1301 USA.  */
17
18 #ifndef _YANDYTEX_H
19 #define _YANDYTEX_H
20
21 #define WORDS_BIGENDIAN 0
22
23 //#pragma warning(disable:4032)
24 #pragma warning(disable:4201)
25 #pragma warning(disable:4996)
26 #pragma warning(disable:4701)
27 //#pragma warning(disable:4100)
28 //#pragma warning(disable:4244)
29 #pragma warning(disable:4131) // old style declarator
30 #pragma warning(disable:4135) // conversion between different integral types
31 #pragma warning(disable:4127) // conditional expression is constant
32
33 /* ``Standard'' headers.  */
34 #include <kpathsea/c-auto.h>
35 #include <kpathsea/c-std.h>
36 #include <kpathsea/c-pathmx.h>
37 #include <kpathsea/c-fopen.h>
38 #include <kpathsea/c-ctype.h>
39 #include <kpathsea/c-proto.h>
40 #include <kpathsea/config.h>
41 #include <kpathsea/getopt.h>
42 #include <kpathsea/lib.h>
43 #include <kpathsea/line.h>
44 #include <kpathsea/readable.h>
45 #include <kpathsea/types.h>
46 #include <kpathsea/tex-file.h>
47 #include <kpathsea/variable.h>
48 #include <kpathsea/absolute.h>
49 #include <stdarg.h>
50 #include <setjmp.h>
51 #include <time.h>
52 #include <signal.h>
53 #ifdef _WIN32
54   #include <kpathsea/win32lib.h>
55 #else
56   #include <unistd.h>
57 #endif
58 #include "zlib.h"
59 #include "md5.h"
60 #include "hpdf.h"
61 #include "hpdf_utils.h"
62
63 typedef long long   integer;
64 typedef double      glue_ratio;
65 typedef boolean     bool;
66 typedef double      real;
67 typedef FILE *      alpha_file;
68 typedef unsigned char  ASCII_code;
69 typedef unsigned short KANJI_code;
70 typedef unsigned char  eight_bits;
71 typedef unsigned short sixteen_bits;
72 typedef integer pool_pointer;
73 typedef integer str_number;
74 typedef unsigned char packed_ASCII_code;
75 typedef integer scaled;
76 typedef integer nonnegative_integer;
77 typedef char small_number;
78
79 typedef enum
80 {
81   NO_FILE_PATH = -1,
82   TEXFORMATPATH,
83   TEXINPUTPATH,
84   TFMFILEPATH,
85 } path_constant_type;
86
87 #ifdef link
88   #undef link
89 #endif
90
91 #define abs(x)   ((integer)(x) >= 0 ? (integer)(x) : (integer)-(x))
92 #define chr(x)   (x)
93 #define ord(x)   (x)
94 #define odd(x)   ((x) % 2)
95 #define round(x) zround((double) (x))
96 #define decr(x)  --(x)
97 #define incr(x)  ++(x)
98 #define fabs(x)  ((x) >= 0.0 ? (x) : -(x))
99 #define PATHMAX  PATH_MAX
100 #define toint(x) ((integer) (x))
101 #define a_open_in(f, p) open_input (&(f), p, FOPEN_R_MODE)
102 #define a_open_out(f)   open_output (&(f), FOPEN_W_MODE)
103 #define a_close(f)          check_fclose (f)
104
105 #define MAXLINE 256
106
107 extern integer zround (double);
108 extern bool eoln (FILE * file);
109 extern bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode);
110 extern bool open_output (FILE **f, char *fopen_mode);
111 extern int check_fclose (FILE * f);
112
113 #define show_line(str,flag) fputs(str,stdout)
114 #define show_char(chr) putc(chr, stdout)
115 extern char log_line[];
116
117 #endif