home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / msgapi38.zip / INCLUDE / STAMP.H < prev    next >
C/C++ Source or Header  |  1994-12-31  |  3KB  |  93 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  MSGAPI Source Code, Version 2.00                                       *
  4.  *  Copyright 1989-1991 by Scott J. Dudley.  All rights reserved.          *
  5.  *                                                                         *
  6.  *  Bitmapped date union                                                   *
  7.  *                                                                         *
  8.  *  For complete details of the licensing restrictions, please refer to    *
  9.  *  the licence agreement, which is published in its entirety in           *
  10.  *  README.1ST.                                                            *
  11.  *                                                                         *
  12.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  13.  *  MSGAPI LICENSING AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF THIS       *
  14.  *  AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO NOT HAVE    *
  15.  *  THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT ONE OF THE   *
  16.  *  ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO USE THIS    *
  17.  *  FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE MSGAPI LICENSING         *
  18.  *  AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH THE   *
  19.  *  AUTHOR.                                                                *
  20.  *                                                                         *
  21.  *  You can contact the author at one of the address listed below:         *
  22.  *                                                                         *
  23.  *  Scott Dudley           FidoNet  1:249/106                              *
  24.  *  777 Downing St.        Internet f106.n249.z1.fidonet.org               *
  25.  *  Kingston, Ont.         BBS      (613) 389-8315   HST/14.4k, 24hrs      *
  26.  *  Canada - K7M 5N3                                                       *
  27.  *                                                                         *
  28.  ***************************************************************************/
  29.  
  30. /* $Id: stamp.h_v 1.0 1991/11/16 16:16:51 sjd Rel sjd $ */
  31.  
  32. #ifndef __STAMP_H_DEFINED
  33. #define __STAMP_H_DEFINED
  34.  
  35. #include "typedefs.h"
  36.  
  37. #ifndef __WATCOMC__
  38. struct _stamp   /* DOS-style datestamp */
  39. {
  40.   struct
  41.   {
  42.     unsigned int da : 5;
  43.     unsigned int mo : 4;
  44.     unsigned int yr : 7;
  45.   } date;
  46.  
  47.   struct
  48.   {
  49.     unsigned int ss : 5;
  50.     unsigned int mm : 6;
  51.     unsigned int hh : 5;
  52.   } time;
  53. };
  54. #else
  55. struct _stamp   /* DOS-style datestamp */
  56. {
  57.   struct
  58.   {
  59.     unsigned short da : 5;
  60.     unsigned short mo : 4;
  61.     unsigned short yr : 7;
  62.   } date;
  63.  
  64.   struct
  65.   {
  66.     unsigned short ss : 5;
  67.     unsigned short mm : 6;
  68.     unsigned short hh : 5;
  69.   } time;
  70. };
  71. #endif
  72.  
  73.  
  74. struct _dos_st
  75. {
  76.   word date;
  77.   word time;
  78. };
  79.  
  80. /* Union so we can access stamp as "int" or by individual components */
  81.  
  82. union stamp_combo   
  83. {
  84.   dword ldate;
  85.   struct _stamp msg_st;
  86.   struct _dos_st dos_st;
  87. };
  88.  
  89. typedef union stamp_combo SCOMBO;
  90.  
  91. #endif /* __STAMP_H_DEFINED */
  92.  
  93.