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.5 by schorsch, Sat Jun 7 12:50:20 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 + #ifndef NULL
11 + #define  NULL           0
12 + #endif
13  
14 +
15   char *
16   mktemp(template)                /* make a unique filename from template */
17   char    *template;
# Line 35 | Line 36 | char   *template;
36          }
37          p = te-1;                       /* final character */
38          for (*p = 'a'; *p <= 'z'; (*p)++)
39 <                if (access(template, F_OK) == -1)
39 >                if (access(template, 0) == -1)
40                          return(template);       /* found unique name */
41          return(NULL);                   /* failure! */
42   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines