tm.h revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5
/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2009 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
/*
* Glenn Fowler
* AT&T Research
*
* time conversion support definitions
*/
#ifndef _TM_H
#if !defined(__PROTO__)
#include <prototyped.h>
#endif
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
#define _TM_H
#define TM_VERSION 20070319L
#include <ast.h>
#include <times.h>
/*
* these indices must agree with tm_dform[]
*/
#define TM_MONTH_ABBREV 0
#define TM_MONTH 12
#define TM_DAY_ABBREV 24
#define TM_DAY 31
#define TM_TIME 38
#define TM_DATE 39
#define TM_DEFAULT 40
#define TM_MERIDIAN 41
#define TM_UT 43
#define TM_DT 47
#define TM_SUFFIXES 51
#define TM_PARTS 55
#define TM_HOURS 62
#define TM_DAYS 66
#define TM_LAST 69
#define TM_THIS 72
#define TM_NEXT 75
#define TM_EXACT 78
#define TM_NOISE 81
#define TM_ORDINAL 85
#define TM_DIGITS 95
#define TM_CTIME 105
#define TM_DATE_1 106
#define TM_INTERNATIONAL 107
#define TM_RECENT 108
#define TM_DISTANT 109
#define TM_MERIDIAN_TIME 110
#define TM_ERA 111
#define TM_ERA_DATE 112
#define TM_ERA_TIME 113
#define TM_ERA_DEFAULT 114
#define TM_ERA_YEAR 115
#define TM_ORDINALS 116
#define TM_FINAL 126
#define TM_WORK 129
#define TM_NFORM 132
typedef struct /* leap second info */
{
int total; /* inclusive total since epoch */
} Tm_leap_t;
typedef struct /* time zone info */
{
char* type; /* type name */
char* standard; /* standard time name */
char* daylight; /* daylight or summertime name */
short west; /* minutes west of GMT */
short dst; /* add to tz.west for DST */
} Tm_zone_t;
typedef struct /* tm library readonly data */
{
char** format; /* default TM_* format strings */
unsigned char* lex; /* format lex type classes */
char* digit; /* output digits */
short* days; /* days in month i */
short* sum; /* days in months before i */
} Tm_data_t;
typedef struct /* tm library global info */
{
char* deformat; /* TM_DEFAULT override */
int flags; /* flags */
char** format; /* current format strings */
} Tm_info_t;
typedef struct Tm_s
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
} Tm_t;
#if _BLD_ast && defined(__EXPORT__)
#endif
#if !_BLD_ast && defined(__IMPORT__)
#endif
#define tm_data (*_tm_datap_)
#define tm_info (*_tm_infop_)
#define __MANGLE__ __LINKAGE__
#if _BLD_ast && defined(__EXPORT__)
#endif
extern __MANGLE__ time_t tmscan __PROTO__((const char*, char**, const char*, char**, time_t*, long));
#define __MANGLE__ __LINKAGE__
#endif