46 |
|
|
47 |
|
|
48 |
|
|
49 |
< |
|
49 |
> |
#include "rtprocess.h" |
50 |
|
#include "meta.h" |
51 |
– |
|
51 |
|
#include "plot.h" |
53 |
– |
|
52 |
|
#include "span.h" |
53 |
|
|
54 |
|
|
55 |
+ |
static int flipbyte(register int b); |
56 |
+ |
static void pinit(void); |
57 |
+ |
static void pclear(void); |
58 |
+ |
static void puninit(void); |
59 |
|
|
60 |
|
|
61 |
|
char *progname; |
97 |
|
conditioned = FALSE; |
98 |
|
|
99 |
|
|
100 |
< |
main(argc, argv) |
100 |
> |
int |
101 |
> |
main( |
102 |
> |
int argc, |
103 |
> |
char **argv |
104 |
> |
) |
105 |
|
|
100 |
– |
int argc; |
101 |
– |
char **argv; |
102 |
– |
|
106 |
|
{ |
107 |
|
FILE *fp; |
105 |
– |
FILE *popen(); |
108 |
|
char comargs[200], command[300]; |
109 |
|
|
110 |
|
progname = *argv++; |
171 |
|
} |
172 |
|
|
173 |
|
|
174 |
< |
|
175 |
< |
|
174 |
< |
|
175 |
< |
|
176 |
< |
thispage() /* rewind and initialize current page */ |
177 |
< |
|
174 |
> |
void |
175 |
> |
thispage(void) /* rewind and initialize current page */ |
176 |
|
{ |
179 |
– |
|
177 |
|
if (lineno != 0) { |
178 |
|
fputs(LFREV, stdout); |
179 |
|
while (lineno) { |
182 |
|
} |
183 |
|
fputs(LFNORM, stdout); |
184 |
|
} |
188 |
– |
|
185 |
|
} |
186 |
|
|
187 |
|
|
188 |
< |
|
189 |
< |
|
194 |
< |
nextpage() /* advance to next page */ |
195 |
< |
|
188 |
> |
void |
189 |
> |
nextpage(void) /* advance to next page */ |
190 |
|
{ |
191 |
|
|
192 |
|
fputs("\f\r", stdout); |
196 |
|
} |
197 |
|
|
198 |
|
|
199 |
< |
|
200 |
< |
contpage() /* continue on this page */ |
207 |
< |
|
199 |
> |
void |
200 |
> |
contpage(void) /* continue on this page */ |
201 |
|
{ |
202 |
|
|
203 |
|
while (lineno++ < NLINES) |
208 |
|
} |
209 |
|
|
210 |
|
|
211 |
< |
|
212 |
< |
printspan() /* output span to printer */ |
220 |
< |
|
211 |
> |
void |
212 |
> |
printspan(void) /* output span to printer */ |
213 |
|
{ |
214 |
|
register int i; |
215 |
|
|
237 |
|
|
238 |
|
|
239 |
|
int |
240 |
< |
flipbyte(b) /* flip an 8-bit byte end-to-end */ |
241 |
< |
|
242 |
< |
register int b; |
251 |
< |
|
240 |
> |
flipbyte( /* flip an 8-bit byte end-to-end */ |
241 |
> |
register int b |
242 |
> |
) |
243 |
|
{ |
244 |
|
register int i, a = 0; |
245 |
|
|
254 |
|
} |
255 |
|
|
256 |
|
|
257 |
+ |
void |
258 |
+ |
printstr( /* output a string to the printer */ |
259 |
+ |
PRIMITIVE *p |
260 |
+ |
) |
261 |
|
|
267 |
– |
|
268 |
– |
printstr(p) /* output a string to the printer */ |
269 |
– |
|
270 |
– |
PRIMITIVE *p; |
271 |
– |
|
262 |
|
{ |
263 |
|
|
264 |
|
fprintf(stdout, "%s%4d", PTAB, CONV(p->xy[XMN], dxsize)); |
272 |
|
fputs(p->args, stdout); |
273 |
|
fputs(PNORM, stdout); |
274 |
|
putc('\r', stdout); |
285 |
– |
|
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
< |
|
279 |
< |
pinit() /* initialize printer for output */ |
278 |
> |
void |
279 |
> |
pinit(void) /* initialize printer for output */ |
280 |
|
{ |
281 |
|
pclear(); |
282 |
|
/* get eighth bit */ |
287 |
|
} |
288 |
|
|
289 |
|
|
290 |
< |
puninit() /* uninitialize printer */ |
290 |
> |
void |
291 |
> |
puninit(void) /* uninitialize printer */ |
292 |
|
{ |
293 |
|
pclear(); |
294 |
|
} |
295 |
|
|
296 |
|
|
297 |
< |
pclear() /* clear printer and sleep */ |
298 |
< |
|
297 |
> |
void |
298 |
> |
pclear(void) /* clear printer and sleep */ |
299 |
|
{ |
300 |
|
register int i, j; |
301 |
|
|