1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* psign.c - produce picture from text. |
6 |
|
* |
7 |
|
* 7/1/87 |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include "standard.h" |
10 |
> |
#include "copyright.h" |
11 |
|
|
12 |
< |
#include "color.h" |
12 |
> |
#include <string.h> |
13 |
|
|
14 |
+ |
#include "standard.h" |
15 |
+ |
#include "platform.h" |
16 |
+ |
#include "color.h" |
17 |
|
#include "font.h" |
18 |
|
|
19 |
|
#ifndef SSS |
38 |
|
int xsiz, ysiz; /* bitmap dimensions */ |
39 |
|
int xdim; /* size of horizontal scan (bytes) */ |
40 |
|
|
41 |
+ |
/* conflicting def's in param.h */ |
42 |
+ |
#undef tstbit |
43 |
+ |
#undef setbit |
44 |
+ |
#undef clrbit |
45 |
+ |
#undef tglbit |
46 |
+ |
|
47 |
|
#define bitop(x,y,op) (ourbitmap[(y)*xdim+((x)>>3)] op (1<<((x)&7))) |
48 |
|
#define tstbit(x,y) bitop(x,y,&) |
49 |
|
#define setbit(x,y) bitop(x,y,|=) |
68 |
|
char *argv[]; |
69 |
|
{ |
70 |
|
int an; |
71 |
< |
#ifdef MSDOS |
66 |
< |
setmode(fileno(stdout), O_BINARY); |
67 |
< |
#endif |
71 |
> |
SET_FILE_BINARY(stdout); |
72 |
|
for (an = 1; an < argc && argv[an][0] == '-'; an++) |
73 |
|
switch (argv[an][1]) { |
74 |
|
case 'c': /* color */ |
208 |
|
ourbitmap = (BYTE *)bmalloc(ysiz*xdim); |
209 |
|
if (ourbitmap == NULL) |
210 |
|
error(SYSTEM, "Out of memory in makemap"); |
211 |
< |
bzero((char *)ourbitmap, ysiz*xdim); |
211 |
> |
memset((char *)ourbitmap, '\0', ysiz*xdim); |
212 |
|
} |
213 |
|
|
214 |
|
|
227 |
|
if (curl == NULL) |
228 |
|
goto memerr; |
229 |
|
len = strlen(buf); |
230 |
< |
curl->s = malloc(len); |
230 |
> |
curl->s = (char *)malloc(len); |
231 |
|
curl->sp = (short *)malloc(sizeof(short)*len--); |
232 |
|
if (curl->s == NULL | curl->sp == NULL) |
233 |
|
goto memerr; |
264 |
|
ourtext = (LINE *)malloc(sizeof(LINE)); |
265 |
|
if (ourtext == NULL) |
266 |
|
goto memerr; |
267 |
< |
ourtext->s = malloc(MAXLINE); |
267 |
> |
ourtext->s = (char *)malloc(MAXLINE); |
268 |
|
if (ourtext->s == NULL) |
269 |
|
goto memerr; |
270 |
|
for (cp = ourtext->s; ac-- > 0; av++) { |
442 |
|
exit(1); |
443 |
|
} |
444 |
|
} |
445 |
< |
free((char *)scanout); |
445 |
> |
free((void *)scanout); |
446 |
|
} |