| 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 |
|
* |
| 13 |
|
|
| 14 |
|
#include "font.h" |
| 15 |
|
|
| 19 |
– |
#include "paths.h" |
| 20 |
– |
|
| 16 |
|
#ifndef SSS |
| 17 |
|
#define SSS 3 /* super-sample size */ |
| 18 |
|
#endif |
| 43 |
|
|
| 44 |
|
FONT *ourfont; /* our font */ |
| 45 |
|
|
| 51 |
– |
char *libpath; /* library search path */ |
| 52 |
– |
|
| 46 |
|
typedef struct line { |
| 47 |
|
char *s; /* line w/o LF */ |
| 48 |
|
short *sp; /* character spacing */ |
| 119 |
|
exit(1); |
| 120 |
|
} |
| 121 |
|
/* load font file */ |
| 129 |
– |
if ((libpath = getenv(ULIBVAR)) == NULL) |
| 130 |
– |
libpath = DEFPATH; |
| 122 |
|
ourfont = getfont(fontfile); |
| 123 |
|
/* get text */ |
| 124 |
|
if (an == argc) |
| 131 |
|
/* convert text to bitmap */ |
| 132 |
|
maptext(); |
| 133 |
|
/* print header */ |
| 134 |
+ |
newheader("RADIANCE", stdout); |
| 135 |
|
printargs(argc, argv, stdout); |
| 136 |
|
fputformat(COLRFMT, stdout); |
| 137 |
|
putchar('\n'); |
| 220 |
|
if (curl == NULL) |
| 221 |
|
goto memerr; |
| 222 |
|
len = strlen(buf); |
| 223 |
< |
curl->s = malloc(len); |
| 223 |
> |
curl->s = (char *)malloc(len); |
| 224 |
|
curl->sp = (short *)malloc(sizeof(short)*len--); |
| 225 |
|
if (curl->s == NULL | curl->sp == NULL) |
| 226 |
|
goto memerr; |
| 257 |
|
ourtext = (LINE *)malloc(sizeof(LINE)); |
| 258 |
|
if (ourtext == NULL) |
| 259 |
|
goto memerr; |
| 260 |
< |
ourtext->s = malloc(MAXLINE); |
| 260 |
> |
ourtext->s = (char *)malloc(MAXLINE); |
| 261 |
|
if (ourtext->s == NULL) |
| 262 |
|
goto memerr; |
| 263 |
|
for (cp = ourtext->s; ac-- > 0; av++) { |
| 435 |
|
exit(1); |
| 436 |
|
} |
| 437 |
|
} |
| 438 |
< |
free((char *)scanout); |
| 438 |
> |
free((void *)scanout); |
| 439 |
|
} |