1 |
< |
/* Copyright (c) 1987 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
16 |
|
|
17 |
|
#define MAXLINE 512 /* longest allowable line */ |
18 |
|
|
19 |
< |
char *fontfile = "/usr/local/lib/ray/helvet.fnt"; /* our font file */ |
19 |
> |
char *fontfile = "helvet.fnt"; /* our font file */ |
20 |
|
|
21 |
|
COLR bgcolr = WHTCOLR; /* background color */ |
22 |
|
COLR fgcolr = BLKCOLR; /* foreground color */ |
49 |
|
LINE *ourtext; /* our text */ |
50 |
|
int nlines, maxline; /* text dimensions */ |
51 |
|
|
52 |
< |
char *malloc(), *calloc(); |
52 |
> |
extern char *malloc(), *calloc(); |
53 |
> |
extern FILE *fropen(); |
54 |
|
|
55 |
|
|
56 |
|
main(argc, argv) |
121 |
|
maptext(); |
122 |
|
/* print header */ |
123 |
|
printargs(argc, argv, stdout); |
124 |
< |
printf("\n\n"); |
124 |
> |
fputformat(COLRFMT, stdout); |
125 |
> |
putchar('\n'); |
126 |
|
/* write out bitmap */ |
127 |
|
writemap(stdout); |
128 |
|
|
156 |
|
int gn, ngv, gv; |
157 |
|
register GLYPH *g; |
158 |
|
|
159 |
< |
if ((fp = fopen(fontfile, "r")) == NULL) { |
160 |
< |
fprintf(stderr, "cannot open font file \"%s\"\n", |
159 |
> |
if ((fp = fropen(fontfile)) == NULL) { |
160 |
> |
fprintf(stderr, "cannot find font file \"%s\"\n", |
161 |
|
fontfile); |
162 |
|
exit(1); |
163 |
|
} |
392 |
|
} |
393 |
|
} |
394 |
|
free((char *)scanout); |
393 |
– |
} |
394 |
– |
|
395 |
– |
|
396 |
– |
printargs(ac, av, fp) /* print arguments to a file */ |
397 |
– |
int ac; |
398 |
– |
char **av; |
399 |
– |
FILE *fp; |
400 |
– |
{ |
401 |
– |
while (ac-- > 0) { |
402 |
– |
fputs(*av++, fp); |
403 |
– |
putc(' ', fp); |
404 |
– |
} |
395 |
|
} |