dtcm: Resolve CID 87822
[oweals/cde.git] / cde / programs / dtcm / libDtCmP / getdate.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*******************************************************************************
24 **
25 **  getdate.h
26 **
27 **  static char sccsid[] = "@(#)getdate.h 1.6 94/11/07 Copyr 1991 Sun Microsystems, Inc."; 
28 **
29 **  $XConsortium: getdate.h /main/3 1995/11/03 10:37:54 rswiston $
30 **
31 **  RESTRICTED CONFIDENTIAL INFORMATION:
32 **
33 **  The information in this document is subject to special
34 **  restrictions in a confidential disclosure agreement between
35 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
36 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
37 **  Sun's specific written approval.  This document and all copies
38 **  and derivative works thereof must be returned or destroyed at
39 **  Sun's request.
40 **
41 **  Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
42 **
43 *******************************************************************************/
44
45 /*                                                                      *
46  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
47  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
48  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
49  * (c) Copyright 1993, 1994 Novell, Inc.                                *
50  */
51
52 #ifndef _GETDATE_H
53 #define _GETDATE_H
54
55 #if defined(USG) || defined(__OpenBSD__)
56 struct timeb
57 {
58         time_t  time;
59         unsigned short millitm;
60         short   timezone;
61         short   dstflag;
62 };
63 #else
64 #include <sys/timeb.h>
65 #endif
66 #include <time.h>
67 #include "ansi_c.h"
68
69 #define BOT_YEAR        1970
70 #define EOT_YEAR        2037
71 #define DATE_PARSE      -1      /* date simply did not parse */
72 #define DATE_BBOT       -2      /* date was before beginning of time */
73 #define DATE_AEOT       -3      /* date was after end of time */
74 #define DATE_BMONTH     -4      /* date had a bad month number */
75 #define DATE_BDAY       -5      /* date had a bad day number */
76 #define DATE_BMIN       -6      /* date had a bad minute number */
77 #define DATE_BHOUR      -7      /* date had a bad hour number */
78 #define DATE_CONV       -8      /* date converted poorly for am/pm/24hr */
79
80 extern time_t           dateconv                P((int, int, int, int, int, int, int, int, int));
81 extern time_t           dayconv                 P((int, int, time_t));
82 extern time_t           timeconv                P((int, int, int, int));
83 extern time_t           monthadd                P((time_t, time_t));
84 extern time_t           daylcorr                P((time_t, time_t));
85 extern time_t           cm_getdate              P((char*, struct timeb *));
86
87 extern void yyerror(char *s);
88
89 #endif