| 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; |
| 62 |
|
|
| 63 |
|
struct span outspan; |
| 97 |
|
conditioned = FALSE; |
| 98 |
|
|
| 99 |
|
|
| 100 |
< |
main(argc, argv) |
| 100 |
> |
int |
| 101 |
> |
main( |
| 102 |
> |
int argc, |
| 103 |
> |
char **argv |
| 104 |
> |
) |
| 105 |
|
|
| 97 |
– |
int argc; |
| 98 |
– |
char **argv; |
| 99 |
– |
|
| 106 |
|
{ |
| 107 |
|
FILE *fp; |
| 108 |
|
char comargs[200], command[300]; |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
|
| 174 |
< |
|
| 175 |
< |
|
| 170 |
< |
|
| 171 |
< |
|
| 172 |
< |
thispage() /* rewind and initialize current page */ |
| 173 |
< |
|
| 174 |
> |
void |
| 175 |
> |
thispage(void) /* rewind and initialize current page */ |
| 176 |
|
{ |
| 175 |
– |
|
| 177 |
|
if (lineno != 0) { |
| 178 |
|
fputs(LFREV, stdout); |
| 179 |
|
while (lineno) { |
| 182 |
|
} |
| 183 |
|
fputs(LFNORM, stdout); |
| 184 |
|
} |
| 184 |
– |
|
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
|
| 188 |
< |
|
| 189 |
< |
|
| 190 |
< |
nextpage() /* advance to next page */ |
| 191 |
< |
|
| 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 */ |
| 203 |
< |
|
| 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 */ |
| 216 |
< |
|
| 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; |
| 247 |
< |
|
| 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 |
|
|
| 263 |
– |
|
| 264 |
– |
printstr(p) /* output a string to the printer */ |
| 265 |
– |
|
| 266 |
– |
PRIMITIVE *p; |
| 267 |
– |
|
| 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); |
| 281 |
– |
|
| 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 |
|
|