6 |
|
* File i/o and recovery |
7 |
|
*/ |
8 |
|
|
9 |
+ |
#include <ctype.h> |
10 |
+ |
#include "platform.h" |
11 |
|
#include "rcontrib.h" |
12 |
|
#include "resolu.h" |
11 |
– |
#include <ctype.h> |
13 |
|
|
14 |
|
/* Close output stream and free record */ |
15 |
|
static void |
153 |
|
(xres + !xres) ); |
154 |
|
while (*cp) ++cp; |
155 |
|
} |
156 |
< |
sprintf(cp, "NCOLS=%d\nNCOMP=3\n", |
157 |
< |
stdos.reclen); |
156 |
> |
if ((xres <= 0) | (stdos.reclen > 1)) |
157 |
> |
sprintf(cp, "NCOLS=%d\n", stdos.reclen); |
158 |
|
printheader(stdout, info); |
159 |
|
} |
160 |
< |
printresolu(stdout, xres, yres); |
160 |
> |
if (stdos.reclen == 1) |
161 |
> |
printresolu(stdout, xres, yres); |
162 |
|
if (waitflush > 0) |
163 |
|
fflush(stdout); |
164 |
|
stdos.xr = xres; stdos.yr = yres; |
225 |
|
(sop->xr + !sop->xr) ); |
226 |
|
while (*cp) ++cp; |
227 |
|
} |
228 |
< |
sprintf(cp, "NCOLS=%d\nNCOMP=3\n", sop->reclen); |
228 |
> |
if ((sop->xr <= 0) | (sop->reclen > 1)) |
229 |
> |
sprintf(cp, "NCOLS=%d\n", sop->reclen); |
230 |
|
printheader(sop->ofp, info); |
231 |
|
} |
232 |
< |
printresolu(sop->ofp, sop->xr, sop->yr); |
232 |
> |
if (sop->reclen == 1) |
233 |
> |
printresolu(sop->ofp, sop->xr, sop->yr); |
234 |
|
if (waitflush > 0) |
235 |
|
fflush(sop->ofp); |
236 |
|
} |
483 |
|
oname); |
484 |
|
error(USER, errmsg); |
485 |
|
} |
486 |
< |
if ((sout.xr > 0) & (sout.yr > 0) && |
486 |
> |
if ((sout.reclen == 1) & (sout.xr > 0) & (sout.yr > 0) && |
487 |
|
(!fscnresolu(&xr, &yr, sout.ofp) || |
488 |
|
(xr != sout.xr) | |
489 |
|
(yr != sout.yr))) { |
593 |
|
} else { |
594 |
|
sout.reclen = 0; |
595 |
|
sout.outpipe = 0; |
596 |
+ |
sout.xr = xres; |
597 |
+ |
sout.yr = yres; |
598 |
|
sout.ofp = NULL; |
599 |
|
} |
600 |
|
if (sout.ofp != NULL) { /* already open? */ |
635 |
|
oname); |
636 |
|
error(USER, errmsg); |
637 |
|
} |
638 |
< |
sout.xr = xres; sout.yr = yres; |
633 |
< |
if ((sout.xr > 0) & (sout.yr > 0) && |
638 |
> |
if ((sout.reclen == 1) & (sout.xr > 0) & (sout.yr > 0) && |
639 |
|
(!fscnresolu(&xr, &yr, sout.ofp) || |
640 |
|
(xr != sout.xr) | |
641 |
|
(yr != sout.yr))) { |