home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / diskutil / fdf / elib / ftimes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-05  |  447 b   |  17 lines

  1. #include <osbind.h>
  2.  
  3.  
  4.  
  5. /*
  6.  * cmptime
  7.  *
  8.  * given two files, return positive if the first has a more recent modification
  9.  * date/time, zero if the files have the same modification date/time or
  10.  * negative if the second is more recent.
  11.  */
  12. long cmptime(const struct _dta *a, const struct _dta *b)
  13. {
  14.     return (((unsigned long)a->dta_date) << 16 | (unsigned long)a->dta_time) -
  15.            (((unsigned long)b->dta_date) << 16 | (unsigned long)b->dta_time);
  16. }
  17.