--- ray/src/px/psign.c 1989/02/02 10:49:28 1.1 +++ ray/src/px/psign.c 1991/11/12 16:04:19 2.1 @@ -1,4 +1,4 @@ -/* Copyright (c) 1987 Regents of the University of California */ +/* Copyright (c) 1991 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -16,7 +16,7 @@ static char SCCSid[] = "$SunId$ LBL"; #define MAXLINE 512 /* longest allowable line */ -char *fontfile = "/usr/local/lib/ray/helvet.fnt"; /* our font file */ +char *fontfile = "helvet.fnt"; /* our font file */ COLR bgcolr = WHTCOLR; /* background color */ COLR fgcolr = BLKCOLR; /* foreground color */ @@ -49,7 +49,8 @@ typedef struct line { LINE *ourtext; /* our text */ int nlines, maxline; /* text dimensions */ -char *malloc(), *calloc(); +extern char *malloc(), *calloc(); +extern FILE *fropen(); main(argc, argv) @@ -120,7 +121,8 @@ unkopt: maptext(); /* print header */ printargs(argc, argv, stdout); - printf("\n\n"); + fputformat(COLRFMT, stdout); + putchar('\n'); /* write out bitmap */ writemap(stdout); @@ -154,8 +156,8 @@ loadfont() /* load the font file */ int gn, ngv, gv; register GLYPH *g; - if ((fp = fopen(fontfile, "r")) == NULL) { - fprintf(stderr, "cannot open font file \"%s\"\n", + if ((fp = fropen(fontfile)) == NULL) { + fprintf(stderr, "cannot find font file \"%s\"\n", fontfile); exit(1); } @@ -390,16 +392,4 @@ FILE *fp; } } free((char *)scanout); -} - - -printargs(ac, av, fp) /* print arguments to a file */ -int ac; -char **av; -FILE *fp; -{ - while (ac-- > 0) { - fputs(*av++, fp); - putc(' ', fp); - } }