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

Comparing ray/src/common/fdate.c (file contents):
Revision 2.3 by greg, Mon Nov 22 09:31:59 1993 UTC vs.
Revision 2.7 by schorsch, Sun Jun 8 12:03:09 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1993 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   * Return file date (UNIX seconds as returned by time(2) call)
6 + *
7 + *  External symbols declared in standard.h
8   */
9  
10 + #include "copyright.h"
11 +
12   #include  <sys/types.h>
13   #include  <sys/stat.h>
14 + #ifdef _WIN32
15 +  #include  <sys/utime.h>
16 + #else
17 +  #include  <utime.h>
18 + #endif
19  
20  
21   time_t
# Line 22 | Line 28 | char  *fname;
28                  return(0);
29  
30          return(sbuf.st_mtime);
31 + }
32 +
33 +
34 + int
35 + setfdate(fname, ftim)                   /* set file date */
36 + char  *fname;
37 + long  ftim;
38 + {
39 +        struct utimbuf utb;
40 +
41 +        utb.actime = utb.modtime = ftim;
42 +        return(utime(fname, &utb));
43 +
44 + #ifdef NOTHING /* XXX does this work anywhere? */
45 +        time_t  ftm[2];
46 +
47 +        ftm[0] = ftm[1] = ftim;
48 +        return(utime(fname, ftm));
49 + #endif
50   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines