Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcm / libDtCmP / getdate.h
1 /*******************************************************************************
2 **
3 **  getdate.h
4 **
5 **  static char sccsid[] = "@(#)getdate.h 1.6 94/11/07 Copyr 1991 Sun Microsystems, Inc."; 
6 **
7 **  $XConsortium: getdate.h /main/3 1995/11/03 10:37:54 rswiston $
8 **
9 **  RESTRICTED CONFIDENTIAL INFORMATION:
10 **
11 **  The information in this document is subject to special
12 **  restrictions in a confidential disclosure agreement between
13 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
14 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
15 **  Sun's specific written approval.  This document and all copies
16 **  and derivative works thereof must be returned or destroyed at
17 **  Sun's request.
18 **
19 **  Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
20 **
21 *******************************************************************************/
22
23 /*                                                                      *
24  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
25  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
26  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
27  * (c) Copyright 1993, 1994 Novell, Inc.                                *
28  */
29
30 #ifndef _GETDATE_H
31 #define _GETDATE_H
32
33 #ifdef USG
34 struct timeb
35 {
36         time_t  time;
37         unsigned short millitm;
38         short   timezone;
39         short   dstflag;
40 };
41 #else
42 #include <sys/timeb.h>
43 #endif
44 #include <time.h>
45 #include "ansi_c.h"
46
47 #define BOT_YEAR        1970
48 #define EOT_YEAR        2037
49 #define DATE_PARSE      -1      /* date simply did not parse */
50 #define DATE_BBOT       -2      /* date was before beginning of time */
51 #define DATE_AEOT       -3      /* date was after end of time */
52 #define DATE_BMONTH     -4      /* date had a bad month number */
53 #define DATE_BDAY       -5      /* date had a bad day number */
54 #define DATE_BMIN       -6      /* date had a bad minute number */
55 #define DATE_BHOUR      -7      /* date had a bad hour number */
56 #define DATE_CONV       -8      /* date converted poorly for am/pm/24hr */
57
58 extern time_t           dateconv                P((int, int, int, int, int, int, int, int, int));
59 extern time_t           dayconv                 P((int, int, time_t));
60 extern time_t           timeconv                P((int, int, int, int));
61 extern time_t           monthadd                P((time_t, time_t));
62 extern time_t           daylcorr                P((time_t, time_t));
63 extern time_t           cm_getdate              P((char*, struct timeb *));
64
65
66 #endif