| 58 |
|
|
| 59 |
|
if (tmTop == NULL) |
| 60 |
|
returnErr(TM_E_TMINVAL); |
| 61 |
< |
if (ls == NULL | scan == NULL | len < 0) |
| 61 |
> |
if ((ls == NULL) | (scan == NULL) | (len < 0)) |
| 62 |
|
returnErr(TM_E_ILLEGAL); |
| 63 |
|
#if TM_PIC_CTRANS |
| 64 |
|
if (tmNeedMatrix(tmTop)) { /* need floating point */ |
| 187 |
|
/* check arguments */ |
| 188 |
|
if (tmTop == NULL) |
| 189 |
|
returnErr(TM_E_TMINVAL); |
| 190 |
< |
if (lpp == NULL | xp == NULL | yp == NULL | |
| 191 |
< |
(fname == NULL & fp == TM_GETFILE)) |
| 190 |
> |
if ((lpp == NULL) | (xp == NULL) | (yp == NULL) | |
| 191 |
> |
((fname == NULL) & (fp == TM_GETFILE))) |
| 192 |
|
returnErr(TM_E_ILLEGAL); |
| 193 |
|
*xp = *yp = 0; /* error precaution */ |
| 194 |
|
if ((inpf = fp) == TM_GETFILE && (inpf = fopen(fname, "r")) == NULL) |
| 197 |
|
if (cpp != TM_NOCHROMP) *cpp = NULL; |
| 198 |
|
info = rhdefault; /* get our header */ |
| 199 |
|
getheader(inpf, headline, (char *)&info); |
| 200 |
< |
if (info.format == FMTBAD | info.expos <= 0. || |
| 200 |
> |
if ((info.format == FMTBAD) | (info.expos <= 0.) || |
| 201 |
|
fgetresolu(xp, yp, inpf) < 0) { |
| 202 |
|
err = TM_E_BADFILE; goto done; |
| 203 |
|
} |
| 250 |
|
|
| 251 |
|
|
| 252 |
|
#ifdef PCOND |
| 253 |
< |
int /* run pcond to map picture */ |
| 253 |
> |
static int /* run pcond to map picture */ |
| 254 |
|
dopcond(psp, xp, yp, flags, monpri, gamval, Lddyn, Ldmax, fname) |
| 255 |
|
BYTE **psp; |
| 256 |
|
int *xp, *yp; |
| 305 |
|
rp = (BYTE *)malloc(sizeof(BYTE) * *xp * *yp); |
| 306 |
|
else |
| 307 |
|
rp = (BYTE *)malloc(3*sizeof(BYTE) * *xp * *yp); |
| 308 |
< |
if ((*psp = rp) == NULL | scan == NULL) { |
| 308 |
> |
if (((*psp = rp) == NULL) | (scan == NULL)) { |
| 309 |
|
pclose(infp); |
| 310 |
|
returnErr(TM_E_NOMEM); |
| 311 |
|
} |
| 351 |
|
TMbright *lp; |
| 352 |
|
int err; |
| 353 |
|
/* check arguments */ |
| 354 |
< |
if (psp == NULL | xp == NULL | yp == NULL | monpri == NULL | |
| 355 |
< |
(fname == NULL & fp == TM_GETFILE)) |
| 354 |
> |
if ((psp == NULL) | (xp == NULL) | (yp == NULL) | (monpri == NULL) | |
| 355 |
> |
((fname == NULL) & (fp == TM_GETFILE))) |
| 356 |
|
returnErr(TM_E_ILLEGAL); |
| 357 |
|
/* set defaults */ |
| 358 |
|
if (gamval < MINGAM) gamval = DEFGAM; |