1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 /*	from OpenSolaris "gen.h	1.5	05/06/08 SMI"	 SVr4.0 1.1		*/
27 
28 /*
29  * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
30  *
31  * Sccsid @(#)gen.h	1.16 (gritter) 10/15/06
32  */
33 
34 /*
35  *
36  * A few definitions that shouldn't have to change. They're used by most of the
37  * programs in this package.
38  *
39  */
40 
41 
42 extern const char	creator[];
43 
44 
45 #define NON_FATAL	0
46 #define FATAL		1
47 #define USER_FATAL	2
48 
49 #define OFF		0
50 #define ON		1
51 
52 #define FALSE		0
53 #define TRUE		1
54 
55 #define BYTE		8
56 #define BMASK		0377
57 
58 #define POINTS		72.3
59 
60 #ifndef PI
61 #define PI		3.141592654
62 #endif
63 
64 
65 /*
66  *
67  * A few simple macros.
68  *
69  */
70 
71 
72 #define ABS(A)		((A) >= 0 ? (A) : -(A))
73 #undef	MIN
74 #define MIN(A, B)	((A) < (B) ? (A) : (B))
75 #undef	MAX
76 #define MAX(A, B)	((A) > (B) ? (A) : (B))
77 
78 /* color.c */
79 void getcolor(void);
80 void newcolor(char *);
81 void setcolor(void);
82 /* dpost.c */
83 void init_signals(void);
84 void header(FILE *);
85 void options(void);
86 void setpaths(char *);
87 void setup(void);
88 void arguments(void);
89 void done(void);
90 void account(void);
91 void conv(register FILE *);
92 void devcntrl(FILE *);
93 void fontinit(void);
94 void loadfont(int, char *, char *, int, int);
95 void loadspecial(void);
96 void loaddefault(void);
97 void fontprint(int);
98 char *mapfont(char *);
99 void getdevmap(void);
100 char *mapdevfont(char *);
101 void reset(void);
102 void resetpos(void);
103 void t_init(void);
104 void t_page(int);
105 void t_newline(void);
106 int t_size(int);
107 void setsize(int, float);
108 void t_fp(int, char *, char *, void *);
109 int t_font(char *);
110 void setfont(int);
111 void t_sf(int);
112 void t_charht(int, float);
113 void t_slant(int);
114 void needresource(const char *, ...);
115 void t_supply(char *);
116 void t_reset(int);
117 void t_trailer(void);
118 void hgoto(int);
119 void hmot(int);
120 void vgoto(int);
121 void vmot(int);
122 void xymove(int, int);
123 void put1s(register char *);
124 void put1(register int);
125 void oput(int);
126 void starttext(void);
127 void endtext(void);
128 void endstring(void);
129 void endline(void);
130 void addchar(int);
131 void addoctal(int);
132 void charlib(int);
133 int doglobal(char *);
134 void documentfont(const char *);
135 void documentfonts(void);
136 void redirect(int);
137 /* draw.c */
138 void getdraw(void);
139 void drawline(int, int);
140 void drawcirc(int, int);
141 void drawellip(int, int, int);
142 void drawarc(int, int, int, int, int);
143 void drawspline(FILE *, int);
144 void beginpath(char *, int);
145 void drawpath(char *, int);
146 void parsebuf(char *);
147 void getbaseline(void);
148 void newbaseline(char *);
149 void drawtext(char *);
150 void settext(char *);
151 /* glob.c */
152 /* misc.c */
153 void error(int, char *, ...);
154 void out_list(char *);
155 int in_olist(int);
156 int cat(char *, FILE *);
157 int str_convert(char **, int);
158 char *tempname(const char *);
159 int psskip(size_t, FILE *);
160 char *psgetline(char **, size_t *, size_t *, FILE *);
161 int sget(char *, size_t, FILE *);
162 /* pictures.c */
163 void picture(char *);
164 FILE *picopen(char *);
165 void inlinepic(FILE *, char *);
166 void piccopy(FILE *, FILE *, long);
167 /* ps_include.c */
168 void ps_include(const char *, FILE *, FILE *, int, int, int, int,
169 		double, double, double, double, double, double, double);
170 /* request.c */
171 void saverequest(char *);
172 void writerequest(int, FILE *);
173 void dumprequest(char *, char *, FILE *);
174 /* tempnam.c */
175