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.27 by greg, Mon Aug 2 21:48:37 1993 UTC vs.
Revision 2.28 by greg, Fri Aug 6 17:12:19 1993 UTC

# Line 205 | Line 205 | char  *pout, *zout, *prvr;
205                                  cp--;
206                          strcpy(cp, RFTEMPLATE);
207                          prvr = mktemp(fbuf2);
208 <                        if (rename(fbuf, prvr) < 0 && errno != ENOENT) {
209 <                                sprintf(errmsg,
208 >                        if (rename(fbuf, prvr) < 0)
209 >                                if (errno == ENOENT) {  /* ghost file */
210 >                                        sprintf(errmsg,
211 >                                                "new output file \"%s\"",
212 >                                                fbuf);
213 >                                        error(WARNING, errmsg);
214 >                                        prvr = NULL;
215 >                                } else {                /* serious error */
216 >                                        sprintf(errmsg,
217                                          "cannot rename \"%s\" to \"%s\"",
218                                                  fbuf, prvr);
219 <                                error(SYSTEM, errmsg);
220 <                        }
219 >                                        error(SYSTEM, errmsg);
220 >                                }
221                  }
222          }
223          npicts = 0;                     /* render sequence */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines