--- ray/src/px/psign.c 1994/04/14 04:53:54 2.17 +++ ray/src/px/psign.c 2003/06/21 15:05:01 2.21 @@ -1,9 +1,6 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: psign.c,v 2.21 2003/06/21 15:05:01 greg Exp $"; #endif - /* * psign.c - produce picture from text. * @@ -11,9 +8,8 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include "standard.h" - +#include "platform.h" #include "color.h" - #include "font.h" #ifndef SSS @@ -38,6 +34,12 @@ unsigned char *ourbitmap; /* our output bitmap */ int xsiz, ysiz; /* bitmap dimensions */ int xdim; /* size of horizontal scan (bytes) */ + /* conflicting def's in param.h */ +#undef tstbit +#undef setbit +#undef clrbit +#undef tglbit + #define bitop(x,y,op) (ourbitmap[(y)*xdim+((x)>>3)] op (1<<((x)&7))) #define tstbit(x,y) bitop(x,y,&) #define setbit(x,y) bitop(x,y,|=) @@ -62,9 +64,7 @@ int argc; char *argv[]; { int an; -#ifdef MSDOS - setmode(fileno(stdout), O_BINARY); -#endif + SET_FILE_BINARY(stdout); for (an = 1; an < argc && argv[an][0] == '-'; an++) switch (argv[an][1]) { case 'c': /* color */ @@ -223,7 +223,7 @@ FILE *fp; if (curl == NULL) goto memerr; len = strlen(buf); - curl->s = malloc(len); + curl->s = (char *)malloc(len); curl->sp = (short *)malloc(sizeof(short)*len--); if (curl->s == NULL | curl->sp == NULL) goto memerr; @@ -260,7 +260,7 @@ char *av[]; ourtext = (LINE *)malloc(sizeof(LINE)); if (ourtext == NULL) goto memerr; - ourtext->s = malloc(MAXLINE); + ourtext->s = (char *)malloc(MAXLINE); if (ourtext->s == NULL) goto memerr; for (cp = ourtext->s; ac-- > 0; av++) { @@ -438,5 +438,5 @@ FILE *fp; exit(1); } } - free((char *)scanout); + free((void *)scanout); }