ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rpict.c
(Generate patch)

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.36 by greg, Sun Dec 12 13:56:08 1993 UTC vs.
Revision 2.37 by greg, Wed Dec 22 21:03:54 1993 UTC

# Line 628 | Line 628 | char  *oldfile;
628          int  x, y;
629  
630          if (oldfile == NULL)
631 <                return(0);
632 <        
631 >                goto gotzip;
632 >
633          if ((fp = fopen(oldfile, "r")) == NULL) {
634                  sprintf(errmsg, "cannot open recover file \"%s\"", oldfile);
635                  error(WARNING, errmsg);
636 <                return(0);
636 >                goto gotzip;
637          }
638   #ifdef MSDOS
639          setmode(fileno(fp), O_BINARY);
# Line 646 | Line 646 | char  *oldfile;
646                                  oldfile);
647                  error(WARNING, errmsg);
648                  fclose(fp);
649 <                return(0);
649 >                goto gotzip;
650          }
651  
652          if (x != hres || y != vres) {
# Line 670 | Line 670 | char  *oldfile;
670          fclose(fp);
671          unlink(oldfile);
672          return(y);
673 + gotzip:
674 +        if (fflush(stdout) == EOF)
675 +                error(SYSTEM, "error writing picture header");
676 +        return(0);
677   writerr:
678          sprintf(errmsg, "write error during recovery of \"%s\"", oldfile);
679          error(SYSTEM, errmsg);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines