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

Comparing ray/src/util/rtcontrib.c (file contents):
Revision 1.21 by greg, Sat Jun 11 15:01:03 2005 UTC vs.
Revision 1.23 by greg, Thu Jun 16 19:37:26 2005 UTC

# Line 623 | Line 623 | getofile(const char *ospec, const char *mname, int bn)
623                  if (header) {
624                          char    info[512];
625                          char    *cp = info;
626 <                        if (ofl & OF_MODIFIER) {
627 <                                sprintf(cp, "MODIFIER=%s\n", mname);
628 <                                while (*cp) ++cp;
629 <                        }
626 >                        sprintf(cp, "MODIFIER=%s\n", mname);
627 >                        while (*cp) ++cp;
628                          if (ofl & OF_BIN) {
629                                  sprintf(cp, "BIN=%d\n", bn);
630                                  while (*cp) ++cp;
# Line 1032 | Line 1030 | recover_output(FILE *fin)
1030                                  error(USER, "cannot recover from command");
1031                                                  /* open output */
1032                          fp = fopen(oname, "rb+");
1033 <                        if (fp == NULL)
1034 <                                break;          /* must be end of modifier */
1033 >                        if (fp == NULL) {
1034 >                                if (j)
1035 >                                        break;  /* assume end of modifier */
1036 >                                sprintf(errmsg, "missing recover file '%s'",
1037 >                                                oname);
1038 >                                error(USER, errmsg);
1039 >                        }
1040                          nvals = lseek(fileno(fp), 0, SEEK_END);
1041                          if (nvals <= 0) {
1042                                  lastout = 0;    /* empty output, quit here */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines