OSDN Git Service

removed some unused functions and headers.
[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 /* ``Standard'' headers.  */
24 #include <kpathsea/c-auto.h>
25 #include <kpathsea/c-std.h>
26 #include <kpathsea/c-pathmx.h>
27 #include <kpathsea/c-fopen.h>
28 #include <kpathsea/c-proto.h>
29 #include <kpathsea/getopt.h>
30 #include <kpathsea/lib.h>
31 #include <kpathsea/types.h>
32 #include "hpdf.h"
33
34 typedef signed char schar;
35 typedef long        integer;
36 typedef double      glue_ratio;
37 typedef double      glueratio;
38 typedef boolean     bool;
39 typedef char *      ccharpointer;
40 typedef double      real;
41 typedef FILE *      file_ptr;
42 typedef FILE *      alpha_file;
43 typedef unsigned char ASCII_code;
44 typedef unsigned short KANJI_code;
45 typedef unsigned char eight_bits;
46 typedef unsigned short sixteen_bits;
47 typedef integer pool_pointer;
48 typedef integer str_number;
49 typedef unsigned char packed_ASCII_code;
50 typedef integer scaled;
51 typedef integer nonnegative_integer;
52 typedef char small_number;
53
54 typedef enum
55 {
56   NO_FILE_PATH = -1,
57   TEXFORMATPATH,
58   TEXINPUTPATH,
59   TFMFILEPATH,
60   LAST_PATH
61 } path_constant_type;
62
63 #define TEXFORMATPATHBIT (1 << TEXFORMATPATH)
64 #define TEXINPUTPATHBIT  (1 << TEXINPUTPATH)
65 #define TFMFILEPATHBIT   (1 << TFMFILEPATH)
66
67 #ifdef link
68   #undef link
69 #endif
70
71 #define abs(x)   ((integer)(x) >= 0 ? (integer)(x) : (integer)-(x))
72 #define chr(x)   (x)
73 #define ord(x)   (x)
74 #define odd(x)   ((x) % 2)
75 #define round(x) zround ((double) (x))
76 #define decr(x)  --(x)
77 #define incr(x)  ++(x)
78 #define fabs(x)  ((x) >= 0.0 ? (x) : -(x))
79 #define PATHMAX  PATH_MAX
80 #define toint(x) ((integer) (x))
81 #define a_open_in(f,p) open_input (&(f), p, FOPEN_R_MODE)
82 #define a_open_out(f)   open_output (&(f), FOPEN_W_MODE)
83 #define a_close(f)      check_fclose (f)
84
85 extern bool trace_flag;
86 extern bool open_trace_flag;
87
88 extern integer zround (double);
89 extern bool test_eof (FILE * file);
90 extern bool eoln (FILE * file);
91 extern bool open_input (FILE **f, path_constant_type path_index, char *fopen_mode);
92 extern bool open_output (FILE **f, char *fopen_mode);
93 extern int check_fclose (FILE * f);
94 extern void argv();
95
96 #define show_line(str,flag) fputs(str,stdout)
97 #define show_char(chr) putc(chr, stdout)
98 extern char log_line[];
99
100 #endif