| 44 |
|
|
| 45 |
|
|
| 46 |
|
char * |
| 47 |
< |
findtack(s) /* find place to tack on suffix */ |
| 48 |
< |
register char *s; |
| 47 |
> |
findtack(char *s) /* find place to tack on suffix */ |
| 48 |
|
{ |
| 49 |
|
while (*s && *s != '.') |
| 50 |
|
s++; |
| 57 |
|
int argc, |
| 58 |
|
char **argv |
| 59 |
|
) |
| 61 |
– |
|
| 60 |
|
{ |
| 61 |
|
FILE *fp; |
| 62 |
|
char comargs[200], command[300]; |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
return(0); |
| 139 |
< |
} |
| 139 |
> |
} |
| 140 |
|
|
| 141 |
|
|
| 144 |
– |
|
| 142 |
|
void |
| 143 |
|
thispage(void) /* rewind current file */ |
| 144 |
|
{ |
| 150 |
|
void |
| 151 |
|
initfile(void) /* initialize this file */ |
| 152 |
|
{ |
| 153 |
< |
static int filenum = 0; |
| 157 |
< |
/* |
| 158 |
< |
static unsigned char cmap[24] = {255,255,255, 255,152,0, 0,188,0, 0,0,255, |
| 159 |
< |
179,179,0, 255,0,255, 0,200,200, 0,0,0}; |
| 160 |
< |
*/ |
| 161 |
< |
static unsigned char cmap[24] = {0,0,0, 0,0,255, 0,188,0, 255,152,0, |
| 153 |
> |
static const unsigned char cmap[24] = {0,0,0, 0,0,255, 0,188,0, 255,152,0, |
| 154 |
|
0,200,200, 255,0,255, 179,179,0, 255,255,255}; |
| 155 |
+ |
static int filenum = 0; |
| 156 |
|
struct hdStruct thead; |
| 157 |
< |
register int i; |
| 157 |
> |
int i; |
| 158 |
|
|
| 159 |
|
if (outtack != NULL) { |
| 160 |
|
sprintf(outtack, "%d.tga", ++filenum); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
|
| 191 |
– |
|
| 184 |
|
void |
| 185 |
|
nextpage(void) /* advance to next page */ |
| 194 |
– |
|
| 186 |
|
{ |
| 187 |
|
|
| 188 |
|
if (lineno == 0) |
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
|
| 212 |
– |
|
| 203 |
|
#define MINRUN 4 |
| 204 |
|
|
| 205 |
< |
extern void |
| 205 |
> |
void |
| 206 |
|
printblock(void) /* output scanline block to file */ |
| 217 |
– |
|
| 207 |
|
{ |
| 208 |
|
int i, c2; |
| 209 |
< |
register unsigned char *scanline; |
| 210 |
< |
register int j, beg, cnt = 0; |
| 209 |
> |
unsigned char *scanline; |
| 210 |
> |
int j, beg, cnt = 0; |
| 211 |
|
|
| 212 |
|
if (lineno == 0) |
| 213 |
|
initfile(); |
| 241 |
|
|
| 242 |
|
void |
| 243 |
|
putint2( /* put a 2-byte positive integer */ |
| 244 |
< |
register int i, |
| 245 |
< |
register FILE *fp |
| 244 |
> |
int i, |
| 245 |
> |
FILE *fp |
| 246 |
|
) |
| 247 |
|
{ |
| 248 |
|
putc(i&0xff, fp); |
| 254 |
|
putthead( /* write header to output */ |
| 255 |
|
struct hdStruct *hp, |
| 256 |
|
char *ip, |
| 257 |
< |
register FILE *fp |
| 257 |
> |
FILE *fp |
| 258 |
|
) |
| 259 |
|
{ |
| 260 |
|
if (ip != NULL) |