home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / flistfrontend / src / datent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-19  |  1004 b   |  34 lines

  1. /* $Id: datent.h,v 1.3 1998/10/19 01:00:19 tom Exp $
  2.  *
  3.  * VMS date+time is stored as a 64-bit integer.  Use my own mode to avoid
  4.  * long sequence of include-files for RMS.  Cover up diffs between VAX and AXP
  5.  * by macros that use the address of the date.
  6.  *
  7.  * Created:
  8.  *    04 Jun 1995 for port to AXP.
  9.  * Updated:
  10.  *    18 Oct 1998 add copyBigDate macro to fix compile problem reported by
  11.  *            Graeme Miller for DEC C 5.3 on VAX.
  12.  *    21 Oct 1995 only use 'unsigned' type rather than 'unsigned long'.
  13.  */
  14. #ifndef DATENT_H
  15. #define DATENT_H
  16.  
  17. #ifdef __alpha
  18. #define isOkDate(p)    (*(p) != 0)
  19. #define isBigDate(p)   (*(p) == -1)
  20. #define makeBigDate(p)  *(p) = -1
  21. #define copyBigDate(d,s) *(d) = *(s)
  22. typedef __int64 DATENT;
  23. #else
  24. typedef struct    my_datent {
  25.     unsigned date64[2];
  26.     } DATENT;
  27. #define isOkDate(p)    ((p)->date64[1] != 0)
  28. #define isBigDate(p)   ((p)->date64[1] == -1)
  29. #define makeBigDate(p)  (p)->date64[1] = -1
  30. #define copyBigDate(d,s) memcpy(d, s, sizeof(DATENT))
  31. #endif
  32.  
  33. #endif /* DATENT_H */
  34.