--- ray/src/common/fdate.c 1993/09/15 15:36:25 2.2 +++ ray/src/common/fdate.c 2003/02/25 02:47:21 2.6 @@ -1,18 +1,19 @@ -/* Copyright (c) 1993 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: fdate.c,v 2.6 2003/02/25 02:47:21 greg Exp $"; #endif - /* * Return file date (UNIX seconds as returned by time(2) call) + * + * External symbols declared in standard.h */ +#include "copyright.h" + #include #include -unsigned long +time_t fdate(fname) /* get file date */ char *fname; { @@ -22,4 +23,17 @@ char *fname; return(0); return(sbuf.st_mtime); +} + + +int +setfdate(fname, ftim) /* set file date */ +char *fname; +long ftim; +{ + time_t ftm[2]; + + ftm[0] = ftm[1] = ftim; + + return(utime(fname, ftm)); }