home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / clockcal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.4 KB  |  44 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. #ident    "@(#)head.sys:clockcal.h    1.4"
  9.  
  10. /*
  11.  * Copyright (C) 1986 Intel Corp.
  12.  */
  13.  
  14. /*
  15.  * These are the ioctl commands and structure
  16.  * for the clock calender.
  17.  * Currently the battery backup clock calender
  18.  * is implemented on the 546, line 6 /dev/clock.
  19.  *
  20.  *    1/29/86        rickb
  21.  *        Created include file.
  22.  */
  23.  
  24. struct    clkcal    {
  25.     unsigned char    ck_milsec;    /* 10 thous. of a second, .x0 */
  26.     unsigned char    ck_decsec;    /* 100th and 10th of a second, 0-99 */
  27.     unsigned char    ck_sec;        /* second of minute, 0-59 */
  28.     unsigned char    ck_min;        /* minute of hour, 0-59 */
  29.     unsigned char    ck_hour;    /* hour of the day, 1-23 */
  30.     unsigned char    ck_wday;    /* day of the week, 1-7 */
  31.     unsigned char    ck_mday;    /* day of the month, 1-31 */
  32.     unsigned char    ck_month;    /* month of the year, 1-12 */
  33.     unsigned char    ck_reserv1;    /* reserved field */
  34.     unsigned char    ck_year;    /* year of the centur, 0-99 */
  35.     unsigned char    ck_reserv2;    /* reserved field */
  36.     };
  37. #define CLKSIZE    11            /* the size of the above structure.
  38.                        since the compiler pads it, it
  39.                        doesn't know it is only 11  */
  40.  
  41. #define    TIME_SET    (('c'<<8)|0)    /* set time on 546 */
  42. #define    TIME_GET    (('c'<<8)|1)    /* get the time from the 546 */
  43.  
  44.