13 |
|
#include <string.h> |
14 |
|
#include <math.h> |
15 |
|
#include <time.h> |
16 |
+ |
|
17 |
|
#include "tmprivat.h" |
18 |
|
#include "resolu.h" |
19 |
+ |
#include "rtprocess.h" |
20 |
|
|
21 |
|
#ifndef TM_PIC_CTRANS |
22 |
|
#define TM_PIC_CTRANS 1 /* transform colors? (expensive) */ |
30 |
|
TMbright inpsfb; /* encoded tm->inpsf */ |
31 |
|
} COLRDATA; |
32 |
|
|
31 |
– |
#ifdef NOPROTO |
32 |
– |
static MEM_PTR colrInit(); |
33 |
– |
static void colrNewSpace(); |
34 |
– |
#else |
33 |
|
static MEM_PTR colrInit(struct tmStruct *); |
34 |
|
static void colrNewSpace(struct tmStruct *); |
35 |
< |
#endif |
35 |
> |
static gethfunc headline; |
36 |
> |
|
37 |
|
static struct tmPackage colrPkg = { /* our package functions */ |
38 |
|
colrInit, colrNewSpace, free |
39 |
|
}; |
141 |
|
|
142 |
|
|
143 |
|
static int |
144 |
< |
headline(s, rh) /* grok a header line */ |
145 |
< |
register char *s; |
146 |
< |
register struct radhead *rh; |
144 |
> |
headline( /* grok a header line */ |
145 |
> |
register char *s, |
146 |
> |
void *vrh |
147 |
> |
) |
148 |
|
{ |
149 |
|
char fmt[32]; |
150 |
+ |
register struct radhead *rh = vrh; |
151 |
|
|
152 |
|
if (formatval(fmt, s)) { |
153 |
|
if (!strcmp(fmt, COLRFMT)) |
197 |
|
*lpp = NULL; |
198 |
|
if (cpp != TM_NOCHROMP) *cpp = NULL; |
199 |
|
info = rhdefault; /* get our header */ |
200 |
< |
getheader(inpf, headline, (char *)&info); |
200 |
> |
getheader(inpf, headline, &info); |
201 |
|
if ((info.format == FMTBAD) | (info.expos <= 0.) || |
202 |
|
fgetresolu(xp, yp, inpf) < 0) { |
203 |
|
err = TM_E_BADFILE; goto done; |