version 1.6, 2005/04/18 21:55:13 |
version 1.7, 2005/05/19 04:17:24 |
|
|
#include <time.h> |
#include <time.h> |
|
|
#include "log.h" |
#include "log.h" |
|
#include "cvs.h" |
|
|
#define YEAR_EPOCH 1970 |
#define YEAR_EPOCH 1970 |
#define YEAR_TMORIGIN 1900 |
#define YEAR_TMORIGIN 1900 |
|
|
* yacc had the %union construct.) Maybe someday; right now we only use |
* yacc had the %union construct.) Maybe someday; right now we only use |
* the %union very rarely. |
* the %union very rarely. |
*/ |
*/ |
static char *yyInput; |
static const char *yyInput; |
static DSTMODE yyDSTmode; |
static DSTMODE yyDSTmode; |
static time_t yyDayOrdinal; |
static time_t yyDayOrdinal; |
static time_t yyDayNumber; |
static time_t yyDayNumber; |
|
|
static int yylex (void); |
static int yylex (void); |
static int yyparse (void); |
static int yyparse (void); |
|
|
time_t get_date(char *, struct timeb *); |
|
|
|
%} |
%} |
|
|
%union { |
%union { |
|
|
} |
} |
|
|
time_t |
time_t |
get_date(char *p, struct timeb *now) |
cvs_date_parse(const char *p) |
{ |
{ |
struct tm *tm, gmt; |
struct tm *tm, gmt; |
struct timeb ftz; |
struct timeb ftz, *now; |
time_t Start, tod, nowtime; |
time_t Start, tod, nowtime; |
|
|
|
now = NULL; |
|
|
yyInput = p; |
yyInput = p; |
if (now == NULL) { |
if (now == NULL) { |