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

Comparing ray/src/common/mktemp.c (file contents):
Revision 2.1 by greg, Mon Oct 5 11:38:00 1992 UTC vs.
Revision 2.4 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Replacement mktemp(3) function for systems without
6   */
7  
8 < #include "standard.h"
8 > #include "copyright.h"
9  
10 + #define  NULL           0
11  
12 +
13   char *
14   mktemp(template)                /* make a unique filename from template */
15   char    *template;
# Line 35 | Line 34 | char   *template;
34          }
35          p = te-1;                       /* final character */
36          for (*p = 'a'; *p <= 'z'; (*p)++)
37 <                if (access(template, F_OK) == -1)
37 >                if (access(template, 0) == -1)
38                          return(template);       /* found unique name */
39          return(NULL);                   /* failure! */
40   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines