| ︙ | | | ︙ | |
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
#define SECSPERDAY (24L * 60L * 60L)
#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
/*
* An entry in the lexical lookup table.
*/
typedef struct _TABLE {
char *name;
int type;
time_t value;
} TABLE;
/*
* Daylight-savings mode: on, off, or not yet known.
|
|
|
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
#define SECSPERDAY (24L * 60L * 60L)
#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
/*
* An entry in the lexical lookup table.
*/
typedef struct _TABLE {
const char *name;
int type;
time_t value;
} TABLE;
/*
* Daylight-savings mode: on, off, or not yet known.
|
| ︙ | | | ︙ | |
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
MERam, MERpm, MER24
} MERIDIAN;
/*
* Prototypes of internal functions.
*/
static void TclDateerror(char *s);
static time_t ToSeconds(time_t Hours, time_t Minutes,
time_t Seconds, MERIDIAN Meridian);
static int LookupWord(char *buff);
static int TclDatelex(void* info);
MODULE_SCOPE int yyparse (void *);
|
|
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
MERam, MERpm, MER24
} MERIDIAN;
/*
* Prototypes of internal functions.
*/
static void TclDateerror(const char *s);
static time_t ToSeconds(time_t Hours, time_t Minutes,
time_t Seconds, MERIDIAN Meridian);
static int LookupWord(char *buff);
static int TclDatelex(void* info);
MODULE_SCOPE int yyparse (void *);
|
| ︙ | | | ︙ | |
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
|
/*
* Dump error messages in the bit bucket.
*/
static void
TclDateerror(s)
char *s;
{
}
static time_t
ToSeconds(Hours, Minutes, Seconds, Meridian)
time_t Hours;
time_t Minutes;
|
|
|
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
|
/*
* Dump error messages in the bit bucket.
*/
static void
TclDateerror(s)
const char *s;
{
}
static time_t
ToSeconds(Hours, Minutes, Seconds, Meridian)
time_t Hours;
time_t Minutes;
|
| ︙ | | | ︙ | |
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
|
}
int
TclClockOldscanObjCmd( clientData, interp, objc, objv )
ClientData clientData; /* Unused */
Tcl_Interp* interp; /* Tcl interpreter */
int objc; /* Count of paraneters */
Tcl_Obj *CONST *objv; /* Parameters */
{
Tcl_Obj* result;
Tcl_Obj* resultElement;
int yr, mo, da;
DateInfo dateInfo;
void* info = (void*) &dateInfo;
|
|
|
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
|
}
int
TclClockOldscanObjCmd( clientData, interp, objc, objv )
ClientData clientData; /* Unused */
Tcl_Interp* interp; /* Tcl interpreter */
int objc; /* Count of paraneters */
Tcl_Obj *const *objv; /* Parameters */
{
Tcl_Obj* result;
Tcl_Obj* resultElement;
int yr, mo, da;
DateInfo dateInfo;
void* info = (void*) &dateInfo;
|
| ︙ | | | ︙ | |