File: tws.h

package info (click to toggle)
pngphoon 1.1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 512 kB
  • sloc: ansic: 5,484; makefile: 58
file content (42 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* tws.h - header file for libtws date/time library */


/* Definition of the tws data structure. */

#ifndef _TWS_H_
#define _TWS_H_ 1

struct tws
{
   int     tw_sec;
   int     tw_min;
   int     tw_hour;
   
   int     tw_mday;
   int     tw_mon;
   int     tw_year;
   
   int     tw_wday;
   int     tw_yday;
   
   int     tw_zone;
   
   long    tw_clock;
   
   int     tw_flags;
#define TW_NULL 0x0000
#define TW_SDAY 0x0007		/* how day-of-week was determined */
#define TW_SEXP 0x0001		/*   explicitly given */
#define TW_DST  0x0010		/* daylight savings time */
};


/* Declarations of routines. */

struct tws *dlocaltime( );
	/* dlocaltime( &clock ) turns a time(3) clock value into a tws */

struct tws *dtwstime( );
	/* dtwstime( ) returns a tws for the current date/time */

#endif