181 |
|
CMATRIX *cm; |
182 |
|
COLORV *mp; |
183 |
|
/* header already loaded */ |
184 |
– |
if ((nrows <= 0) | (ncols <= 0) && !fscnresolu(&ncols, &nrows, fp)) { |
185 |
– |
error(USER, "bad picture resolution string"); |
186 |
– |
return(NULL); |
187 |
– |
} |
184 |
|
cm = cm_alloc(nrows, ncols); |
185 |
|
if (!cm) |
186 |
|
return(NULL); |
238 |
|
char *err = cm_getheader(&dtype, &nrows, &ncols, &swap, scale, fp); |
239 |
|
if (err) |
240 |
|
error(USER, err); |
245 |
– |
if (ncols <= 0) |
246 |
– |
error(USER, "unspecified number of columns"); |
241 |
|
} |
242 |
+ |
if (ncols <= 0 && !fscnresolu(&ncols, &nrows, fp)) |
243 |
+ |
error(USER, "unspecified number of columns"); |
244 |
|
switch (dtype) { |
245 |
|
case DTascii: |
246 |
|
case DTfloat: |