Icons are changed
[gnuplot] / src / gp_time.h
1 /*
2  * $Id: gp_time.h,v 1.6.4.1 2008/09/02 21:12:59 sfeam Exp $
3  */
4
5 /* GNUPLOT - gp_time.h */
6
7 /*[
8  * Copyright 1999, 2004   Thomas Williams, Colin Kelley
9  *
10  * Permission to use, copy, and distribute this software and its
11  * documentation for any purpose with or without fee is hereby granted,
12  * provided that the above copyright notice appear in all copies and
13  * that both that copyright notice and this permission notice appear
14  * in supporting documentation.
15  *
16  * Permission to modify the software is granted, but not the right to
17  * distribute the complete modified source code.  Modifications are to
18  * be distributed as patches to the released version.  Permission to
19  * distribute binaries produced by compiling modified sources is granted,
20  * provided you
21  *   1. distribute the corresponding source modifications from the
22  *    released version in the form of a patch file along with the binaries,
23  *   2. add special version identification to distinguish your version
24  *    in addition to the base release version number,
25  *   3. provide your name and address as the primary contact for the
26  *    support of your modified version, and
27  *   4. retain our contact information in regard to use of the base
28  *    software.
29  * Permission to distribute the released version of the source code along
30  * with corresponding source modifications in the form of a patch file is
31  * granted with same provisions 2 through 4 for binary distributions.
32  *
33  * This software is provided "as is" without express or implied warranty
34  * to the extent permitted by applicable law.
35 ]*/
36
37 #ifndef GNUPLOT_GP_TIME_H
38 # define GNUPLOT_GP_TIME_H
39
40 /* #if... / #include / #define collection: */
41
42 #include "syscfg.h"
43 #include "stdfn.h"
44
45 /* defines used for timeseries, seconds */
46 #define ZERO_YEAR       2000
47 #define JAN_FIRST_WDAY 6  /* 1st jan, 2000 is a Saturday (cal 1 2000 on unix) */
48 #define SEC_OFFS_SYS    946684800.0             /*  zero gnuplot (2000) - zero system (1970) */
49 #define YEAR_SEC        31557600.0      /* avg, incl. leap year */
50 #define MON_SEC         2629800.0       /* YEAR_SEC / 12 */
51 #define WEEK_SEC        604800.0
52 #define DAY_SEC         86400.0
53
54 /* Type definitions */
55
56 /* Variables of time.c needed by other modules: */
57
58 /* Prototypes of functions exported by time.c */
59
60 /* string to *tm */
61 char * gstrptime __PROTO((char *, char *, struct tm *));
62
63 /* seconds to string */
64 size_t gstrftime __PROTO((char *, size_t, const char *, double));
65
66 /* *tm to seconds */
67 double gtimegm __PROTO((struct tm *));
68
69 /* seconds to *tm */
70 int ggmtime __PROTO((struct tm *, double));
71
72
73
74 #endif /* GNUPLOT_GP_TIME_H */