w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dvips.h
Go to the documentation of this file.
1 /*
2  * This is dvips, a freely redistributable PostScript driver
3  * for dvi files. It is (C) Copyright 1986-94 by Tomas Rokicki.
4  * You may modify and use this program to your heart's content,
5  * so long as you send modifications to Tomas Rokicki. It can
6  * be included in any distribution, commercial or otherwise, so
7  * long as the banner string defined below is not modified (except
8  * for the version number) and this banner is printed on program
9  * invocation, or can be printed on program invocation with the -? option.
10  */
11 
12 /* This file is the header for dvips's global data structures. */
13 
14 #ifdef KPATHSEA
15 #include <kpathsea/c-auto.h>
16 #include <kpathsea/c-std.h>
17 /*#include <kpathsea/c-proto.h>*/
18 #ifdef __STDC__
19 #define NeedFunctionPrototypes 1
20 #include <kpathsea/c-proto.h>
21 #endif
22 #include <kpathsea/c-fopen.h>
23 #include <kpathsea/lib.h>
24 /*
25 #include "debug.h"
26 */
27 #endif
28 /* Please don't turn debugging off! */
29 #ifndef DEBUG
30 #define DEBUG
31 #endif
32 
33 #ifndef KPATHSEA
34 #include <stdio.h>
35 #if defined(SYSV) || defined(VMS) || defined(__THINK__) || defined(MSDOS) || defined(OS2) || defined(ATARIST) || defined(WIN32)
36 #include <string.h>
37 #else
38 #include <strings.h>
39 #endif
40 #endif
41 #if defined(lint) && defined(sun)
42 extern char *sprintf() ;
43 #endif
44 /*
45 #include "paths.h"
46 #include "debug.h"
47 */
48 #ifdef VMS
49 #include "[.vms]vms.h"
50 #endif /* VMS */
51 #include <stdlib.h>
52 
53 /*
54  * Type declarations. integer must be a 32-bit signed; shalfword must
55  * be a sixteen-bit signed; halfword must be a sixteen-bit unsigned;
56  * quarterword must be an eight-bit unsigned.
57  */
58 #if (defined(MSDOS) && !defined(DJGPP)) || (defined(OS2) && defined(_MSC_VER)) || defined(ATARIST)
59 typedef long integer;
60 #else
61 typedef int integer;
62 #endif
63 #ifndef KPATHSEA
64 typedef char boolean;
65 #endif
66 typedef double real;
67 typedef short shalfword ;
68 typedef unsigned short halfword ;
69 typedef unsigned char quarterword ;
70 #ifdef WIN32
71 #define Boolean boolean
72 #else
73 #ifndef __THINK__
74 typedef short Boolean ;
75 #endif
76 #endif
77 
78 /* Things that KPATHSEA knows, and are useful even without it. */
79 #if !defined(KPATHSEA)
80 
81 #if defined(MSDOS) || defined(OS2) || defined(WIN32)
82 #define FOPEN_ABIN_MODE "ab"
83 #define FOPEN_RBIN_MODE "rb"
84 #else
85 #define FOPEN_ABIN_MODE "a"
86 #define FOPEN_RBIN_MODE "r"
87 #endif
88 
89 #if (defined MSDOS || defined OS2 || defined WIN32)
90 #define WRITEBIN "wb"
91 #else
92 #ifdef VMCMS
93 #define WRITEBIN "wb, lrecl=1024, recfm=f"
94 #else
95 #define WRITEBIN "w"
96 #endif
97 #endif
98 
99 #if defined(WIN32)
100 #define STDC_HEADERS
101 #include <io.h>
102 #include <fcntl.h>
103 #define O_BINARY _O_BINARY
104 #define popen _popen
105 #define pclose _pclose
106 #define register
107 #define SET_BINARY(fd) _setmode((fd), _O_BINARY)
108 #else /* !WIN32 */
109 #define SET_BINARY(fd)
110 #endif
111 
112  /* To Prototype or not to prototype ? */
113 #ifdef NeedFunctionPrototypes
114 
115 #define AA(args) args /* For an arbitrary number; ARGS must be in parens. */
116 
117 #define P1H(p1) (p1)
118 #define P2H(p1,p2) (p1, p2)
119 #define P3H(p1,p2,p3) (p1, p2, p3)
120 #define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
121 #define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
122 #define P6H(p1,p2,p3,p4,p5,p6) (p1, p2, p3, p4, p5, p6)
123 
124 #define P1C(t1,n1)(t1 n1)
125 #define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
126 #define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
127 #define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
128 #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
129  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
130 #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) \
131  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
132 
133 #else /* no function prototypes */
134 
135 #define AA(args) ()
136 
137 #define P1H(p1) ()
138 #define P2H(p1, p2) ()
139 #define P3H(p1, p2, p3) ()
140 #define P4H(p1, p2, p3, p4) ()
141 #define P5H(p1, p2, p3, p4, p5) ()
142 #define P6H(p1, p2, p3, p4, p5, p6) ()
143 
144 #define P1C(t1,n1) (n1) t1 n1;
145 #define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
146 #define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
147 #define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
148  t1 n1; t2 n2; t3 n3; t4 n4;
149 #define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1,n2,n3,n4,n5) \
150  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
151 #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) (n1,n2,n3,n4,n5,n6) \
152  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6;
153 
154 #endif /* function prototypes */
155 
156 #ifdef NeedFunctionPrototypes
157 #define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
158  (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9)
159 #else
160 #define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
161  t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9;
162 #endif
163 
164 #endif
double real
Definition: dvips.h:66
char boolean
Definition: dvips.h:64
int integer
Definition: dvips.h:61
short shalfword
Definition: dvips.h:67
short Boolean
Definition: dvips.h:74
unsigned short halfword
Definition: dvips.h:68
unsigned char quarterword
Definition: dvips.h:69
#define sprintf
Definition: snprintf.c:44