OSDN Git Service

redesigning header.
[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:4996) //
24 #pragma warning(disable:4701) //
25 #pragma warning(disable:4100)
26 #pragma warning(disable:4244)
27 #pragma warning(disable:4131) // old style declarator
28 #pragma warning(disable:4135) // conversion between different integral types
29 #pragma warning(disable:4127) // conditional expression is constant
30
31 /* ``Standard'' headers.  */
32 #include <kpathsea/c-auto.h>
33 #include <kpathsea/c-std.h>
34 #include <kpathsea/c-pathmx.h>
35 #include <kpathsea/c-fopen.h>
36 #include <kpathsea/c-ctype.h>
37 #include <kpathsea/c-proto.h>
38 #include <kpathsea/config.h>
39 #include <kpathsea/getopt.h>
40 #include <kpathsea/lib.h>
41 #include <kpathsea/line.h>
42 #include <kpathsea/readable.h>
43 #include <kpathsea/types.h>
44 #include <kpathsea/tex-file.h>
45 #include <kpathsea/variable.h>
46 #include <kpathsea/absolute.h>
47 #include <setjmp.h>
48 #include <time.h>
49 #include <signal.h>
50 #include "hpdf.h"
51 #include "avl.h"
52
53 typedef long        integer;
54 typedef double      glue_ratio;
55 typedef boolean     bool;
56 typedef double      real;
57 typedef FILE *      alpha_file;
58 typedef unsigned char ASCII_code;
59 typedef unsigned short KANJI_code;
60 typedef unsigned char eight_bits;
61 typedef unsigned short sixteen_bits;
62 typedef integer pool_pointer;
63 typedef integer str_number;
64 typedef unsigned char packed_ASCII_code;
65 typedef integer scaled;
66 typedef integer nonnegative_integer;
67 typedef char small_number;
68
69 typedef enum
70 {
71   NO_FILE_PATH = -1,
72   TEXFORMATPATH,
73   TEXINPUTPATH,
74   TFMFILEPATH,
75   LAST_PATH
76 } path_constant_type;
77
78 #define TEXFORMATPATHBIT (1 << TEXFORMATPATH)
79 #define TEXINPUTPATHBIT  (1 << TEXINPUTPATH)
80 #define TFMFILEPATHBIT   (1 << TFMFILEPATH)
81
82 #ifdef link
83   #undef link
84 #endif
85
86 #define abs(x)   ((integer)(x) >= 0 ? (integer)(x) : (integer)-(x))
87 #define chr(x)   (x)
88 #define ord(x)   (x)
89 #define odd(x)   ((x) % 2)
90 #define round(x) zround ((double) (x))
91 #define decr(x)  --(x)
92 #define incr(x)  ++(x)
93 #define fabs(x)  ((x) >= 0.0 ? (x) : -(x))
94 #define PATHMAX  PATH_MAX
95 #define toint(x) ((integer) (x))
96 #define a_open_in(f,p) open_input (&(f), p, FOPEN_R_MODE)
97 #define a_open_out(f)   open_output (&(f), FOPEN_W_MODE)
98 #define a_close(f)      check_fclose (f)
99
100 extern bool trace_flag;
101 extern bool open_trace_flag;
102
103 extern integer zround (double);
104 extern bool test_eof (FILE * file);
105 extern bool eoln (FILE * file);
106 extern bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode);
107 extern bool open_output (FILE **f, char *fopen_mode);
108 extern int check_fclose (FILE * f);
109
110 #define show_line(str,flag) fputs(str,stdout)
111 #define show_char(chr) putc(chr, stdout)
112 extern char log_line[];
113
114 #endif