| 60 |  | nextscan()                              /* read and condition next scanline */ | 
| 61 |  | { | 
| 62 |  | if (nread >= numscans(&inpres)) { | 
| 63 | < | #ifdef DEBUG | 
| 64 | < | fputs("done\n", stderr); | 
| 65 | < | #endif | 
| 66 | < | return(NULL); | 
| 63 | > | free((char *)scanbuf); | 
| 64 | > | return(scanbuf = NULL); | 
| 65 |  | } | 
| 66 |  | if (what2do&DO_ACUITY) | 
| 67 |  | acuscan(scanbuf, nread); | 
| 97 |  | comprgb2rgbmat(mbcond.cmat, inprims, outprims); | 
| 98 |  | else | 
| 99 |  | compxyz2rgbmat(mbcond.cmat, outprims); | 
| 100 | < | if (what2do&DO_ACUITY) { | 
| 103 | < | #ifdef DEBUG | 
| 104 | < | fprintf(stderr, "%s: initializing acuity sampling...", | 
| 105 | < | progname); | 
| 106 | < | #endif | 
| 100 | > | if (what2do&DO_ACUITY) | 
| 101 |  | initacuity(); | 
| 108 | – | #ifdef DEBUG | 
| 109 | – | fprintf(stderr, "done\n"); | 
| 110 | – | #endif | 
| 111 | – | } | 
| 102 |  | scanbuf = (COLOR *)malloc(scanlen(&inpres)*sizeof(COLOR)); | 
| 103 |  | if (scanbuf == NULL) | 
| 104 |  | syserror("malloc"); | 
| 105 |  | nread = 0; | 
| 116 | – | #ifdef DEBUG | 
| 117 | – | fprintf(stderr, "%s: processing image...", progname); | 
| 118 | – | #endif | 
| 106 |  | return(nextscan()); | 
| 107 |  | } | 
| 108 |  |  |