home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / sqdev200.zip / h / stamp.h < prev    next >
C/C++ Source or Header  |  1994-05-23  |  3KB  |  84 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  Squish Developers Kit Source, Version 2.00                             *
  4.  *  Copyright 1989-1994 by SCI Communications.  All rights reserved.       *
  5.  *                                                                         *
  6.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  7.  *  SQUISH DEVELOPERS KIT LICENSING AGREEMENT IN SQDEV.PRN.  IF YOU DO NOT *
  8.  *  FIND THE TEXT OF THIS AGREEMENT IN THE AFOREMENTIONED FILE, OR IF YOU  *
  9.  *  DO NOT HAVE THIS FILE, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT    *
  10.  *  ONE OF THE ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO  *
  11.  *  USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE SQUISH          *
  12.  *  DEVELOPERS KIT LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE *
  13.  *  ABLE TO REACH WITH THE AUTHOR.                                         *
  14.  *                                                                         *
  15.  *  You can contact the author at one of the address listed below:         *
  16.  *                                                                         *
  17.  *  Scott Dudley       FidoNet     1:249/106                               *
  18.  *  777 Downing St.    Internet    sjd@f106.n249.z1.fidonet.org            *
  19.  *  Kingston, Ont.     CompuServe  >INTERNET:sjd@f106.n249.z1.fidonet.org  *
  20.  *  Canada  K7M 5N3    BBS         1-613-634-3058, V.32bis                 *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. #ifndef __STAMP_H_DEFINED
  25. #define __STAMP_H_DEFINED
  26.  
  27. #include "typedefs.h"
  28.  
  29. struct _stamp   /* DOS-style datestamp */
  30. {
  31.   struct
  32.   {
  33.     /* IBM Cset/2 is allergic to "unsigned short" when declaring bitfields! */
  34.  
  35. #ifdef __IBMC__
  36.     unsigned int da : 5;
  37.     unsigned int mo : 4;
  38.     unsigned int yr : 7;
  39. #else
  40. /*lint -e46 */
  41.     word da : 5;
  42.     word mo : 4;
  43.     word yr : 7;
  44. /*lint -restore */
  45. #endif
  46.   } date;
  47.  
  48.   struct
  49.   {
  50. #ifdef __IBMC__
  51.     unsigned int ss : 5;
  52.     unsigned int mm : 6;
  53.     unsigned int hh : 5;
  54. #else
  55. /*lint -e46 */
  56.     word ss : 5;
  57.     word mm : 6;
  58.     word hh : 5;
  59. /*lint -restore */
  60. #endif
  61.   } time;
  62. };
  63.  
  64.  
  65. struct _dos_st
  66. {
  67.   word date;
  68.   word time;
  69. };
  70.  
  71. /* Union so we can access stamp as "int" or by individual components */
  72.  
  73. union stamp_combo   
  74. {
  75.   dword ldate;
  76.   struct _stamp msg_st;
  77.   struct _dos_st dos_st;
  78. };
  79.  
  80. typedef union stamp_combo SCOMBO;
  81.  
  82. #endif /* __STAMP_H_DEFINED */
  83.  
  84.