citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
parsedate.c File Reference
#include "sysdep.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <ctype.h>
#include <time.h>
#include <string.h>
#include <strings.h>
#include "parsedate.h"
#include <limits.h>
Include dependency graph for parsedate.c:

Go to the source code of this file.

Data Structures

struct  _TABLE
 
union  YYSTYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.7"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   date_parse
 
#define yylex   date_lex
 
#define yyerror   date_error
 
#define EPOCH   1970
 
#define END_OF_TIME   2038
 
#define DST_OFFSET   1
 
#define SECSPERDAY   (24L * 60L * 60L)
 
#define HOUR(x)   (x * 60)
 
#define LPAREN   '('
 
#define RPAREN   ')'
 
#define IS7BIT(x)   ((unsigned int)(x) < 0200)
 
#define SIZEOF(array)   ((int)(sizeof array / sizeof array[0]))
 
#define ENDOF(array)   (&array[SIZEOF(array)])
 
#define YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTR   ((void*)0)
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define YYEOF   0
 
#define YYerror   256
 
#define YYUNDEF   257
 
#define tDAY   258
 
#define tDAYZONE   259
 
#define tMERIDIAN   260
 
#define tMONTH   261
 
#define tMONTH_UNIT   262
 
#define tSEC_UNIT   263
 
#define tSNUMBER   264
 
#define tUNUMBER   265
 
#define tZONE   266
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYPTRDIFF_T   long
 
#define YYPTRDIFF_MAXIMUM   LONG_MAX
 
#define YYSIZE_T   unsigned
 
#define YYSIZE_MAXIMUM
 
#define YYSIZEOF(X)   YY_CAST (YYPTRDIFF_T, sizeof (X))
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE_PURE
 
#define YY_ATTRIBUTE_UNUSED
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YY_IGNORE_USELESS_CAST_BEGIN
 
#define YY_IGNORE_USELESS_CAST_END
 
#define YY_ASSERT(E)   ((void) (0 && (E)))
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   2
 
#define YYLAST   40
 
#define YYNTOKENS   15
 
#define YYNNTS   9
 
#define YYNRULES   30
 
#define YYNSTATES   44
 
#define YYMAXUTOK   266
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (yysymbol_kind_t, yystos[State])
 
#define YYPACT_NINF   (-29)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-1)
 
#define yytable_value_is_error(Yyn)    0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYERRCODE   YYUNDEF
 
#define YYDPRINTF(Args)   ((void) 0)
 
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef struct _TABLE TABLE
 
typedef enum _DSTMODE DSTMODE
 
typedef enum _MERIDIAN MERIDIAN
 
typedef enum yytokentype yytoken_kind_t
 
typedef union YYSTYPE YYSTYPE
 
typedef enum yysymbol_kind_t yysymbol_kind_t
 
typedef signed char yytype_int8
 
typedef short yytype_int16
 
typedef unsigned char yytype_uint8
 
typedef unsigned short yytype_uint16
 
typedef yytype_int8 yy_state_t
 
typedef int yy_state_fast_t
 

Enumerations

enum  _DSTMODE { DSTon , DSToff , DSTmaybe }
 
enum  _MERIDIAN { MERam , MERpm , MER24 }
 
enum  yytokentype {
  YYEMPTY = -2 , YYEOF = 0 , YYerror = 256 , YYUNDEF = 257 ,
  tDAY = 258 , tDAYZONE = 259 , tMERIDIAN = 260 , tMONTH = 261 ,
  tMONTH_UNIT = 262 , tSEC_UNIT = 263 , tSNUMBER = 264 , tUNUMBER = 265 ,
  tZONE = 266
}
 
enum  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_tDAY = 3 , YYSYMBOL_tDAYZONE = 4 , YYSYMBOL_tMERIDIAN = 5 , YYSYMBOL_tMONTH = 6 ,
  YYSYMBOL_tMONTH_UNIT = 7 , YYSYMBOL_tSEC_UNIT = 8 , YYSYMBOL_tSNUMBER = 9 , YYSYMBOL_tUNUMBER = 10 ,
  YYSYMBOL_tZONE = 11 , YYSYMBOL_12_ = 12 , YYSYMBOL_13_ = 13 , YYSYMBOL_14_ = 14 ,
  YYSYMBOL_YYACCEPT = 15 , YYSYMBOL_spec = 16 , YYSYMBOL_item = 17 , YYSYMBOL_time = 18 ,
  YYSYMBOL_zone = 19 , YYSYMBOL_numzone = 20 , YYSYMBOL_date = 21 , YYSYMBOL_rel = 22 ,
  YYSYMBOL_o_merid = 23
}
 
enum  { YYENOMEM = -2 }
 

Functions

int date_lex (void)
 
static void date_error (char *)
 
int date_parse (void)
 
void * malloc (unsigned)
 
void free (void *)
 
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
 
static time_t ToSeconds (time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
 
static time_t Convert (time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian, DSTMODE dst)
 
static time_t DSTcorrect (time_t Start, time_t Future)
 
static time_t RelativeMonth (time_t Start, time_t RelMonth)
 
static int LookupWord (char *buff, register int length)
 
time_t parsedate (const char *p)
 

Variables

static const char * yyInput
 
static DSTMODE yyDSTmode
 
static int yyHaveDate
 
static int yyHaveRel
 
static int yyHaveTime
 
static time_t yyTimezone
 
static time_t yyDay
 
static time_t yyHour
 
static time_t yyMinutes
 
static time_t yyMonth
 
static time_t yySeconds
 
static time_t yyYear
 
static MERIDIAN yyMeridian
 
static time_t yyRelMonth
 
static time_t yyRelSeconds
 
YYSTYPE yylval
 
static const yytype_int8 yytranslate []
 
static const yytype_int8 yypact []
 
static const yytype_int8 yydefact []
 
static const yytype_int8 yypgoto []
 
static const yytype_int8 yydefgoto []
 
static const yytype_int8 yytable []
 
static const yytype_int8 yycheck []
 
static const yytype_int8 yystos []
 
static const yytype_int8 yyr1 []
 
static const yytype_int8 yyr2 []
 
int yychar
 
int yynerrs
 
static TABLE MonthDayTable []
 
static TABLE UnitsTable []
 
static TABLE TimezoneTable []
 

Macro Definition Documentation

◆ DST_OFFSET

#define DST_OFFSET   1

Definition at line 122 of file parsedate.c.

◆ END_OF_TIME

#define END_OF_TIME   2038

Definition at line 120 of file parsedate.c.

◆ ENDOF

#define ENDOF (   array)    (&array[SIZEOF(array)])

Definition at line 132 of file parsedate.c.

◆ EPOCH

#define EPOCH   1970

Definition at line 119 of file parsedate.c.

◆ HOUR

#define HOUR (   x)    (x * 60)

Definition at line 125 of file parsedate.c.

◆ IS7BIT

#define IS7BIT (   x)    ((unsigned int)(x) < 0200)

Definition at line 129 of file parsedate.c.

◆ LPAREN

#define LPAREN   '('

Definition at line 127 of file parsedate.c.

◆ RPAREN

#define RPAREN   ')'

Definition at line 128 of file parsedate.c.

◆ SECSPERDAY

#define SECSPERDAY   (24L * 60L * 60L)

Definition at line 123 of file parsedate.c.

◆ SIZEOF

#define SIZEOF (   array)    ((int)(sizeof array / sizeof array[0]))

Definition at line 131 of file parsedate.c.

◆ tDAY

#define tDAY   258

Definition at line 240 of file parsedate.c.

◆ tDAYZONE

#define tDAYZONE   259

Definition at line 241 of file parsedate.c.

◆ tMERIDIAN

#define tMERIDIAN   260

Definition at line 242 of file parsedate.c.

◆ tMONTH

#define tMONTH   261

Definition at line 243 of file parsedate.c.

◆ tMONTH_UNIT

#define tMONTH_UNIT   262

Definition at line 244 of file parsedate.c.

◆ tSEC_UNIT

#define tSEC_UNIT   263

Definition at line 245 of file parsedate.c.

◆ tSNUMBER

#define tSNUMBER   264

Definition at line 246 of file parsedate.c.

◆ tUNUMBER

#define tUNUMBER   265

Definition at line 247 of file parsedate.c.

◆ tZONE

#define tZONE   266

Definition at line 248 of file parsedate.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 418 of file parsedate.c.

◆ YY_ACCESSING_SYMBOL

#define YY_ACCESSING_SYMBOL (   State)    YY_CAST (yysymbol_kind_t, yystos[State])

Accessing symbol of state STATE.

Definition at line 677 of file parsedate.c.

◆ YY_ASSERT

#define YY_ASSERT (   E)    ((void) (0 && (E)))

Definition at line 478 of file parsedate.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 427 of file parsedate.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 435 of file parsedate.c.

◆ YY_CAST

#define YY_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 190 of file parsedate.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 458 of file parsedate.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 459 of file parsedate.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 473 of file parsedate.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 474 of file parsedate.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 455 of file parsedate.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 202 of file parsedate.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 971 of file parsedate.c.

◆ YY_REINTERPRET_CAST

#define YY_REINTERPRET_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 191 of file parsedate.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 970 of file parsedate.c.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Kind,
  Value,
  Location 
)

Definition at line 969 of file parsedate.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 813 of file parsedate.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 812 of file parsedate.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
@ YYEMPTY
Definition: parsedate.c:220
#define YY_(Msgid)
Definition: parsedate.c:418
YYSTYPE yylval
Definition: parsedate.c:1019
int yychar
Definition: parsedate.c:1016
#define YYERROR
Definition: parsedate.c:814

Definition at line 819 of file parsedate.c.

◆ YYBISON

#define YYBISON   1

Definition at line 49 of file parsedate.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.7"

Definition at line 52 of file parsedate.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 810 of file parsedate.c.

◆ YYCOPY

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
#define YYPTRDIFF_T
Definition: parsedate.c:377

Definition at line 595 of file parsedate.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 567 of file parsedate.c.

◆ YYDEBUG

#define YYDEBUG   0

Definition at line 209 of file parsedate.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)    ((void) 0)

Definition at line 968 of file parsedate.c.

◆ YYEOF

#define YYEOF   0

Definition at line 237 of file parsedate.c.

◆ YYERRCODE

#define YYERRCODE   YYUNDEF

Definition at line 838 of file parsedate.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 809 of file parsedate.c.

◆ yyerror

#define yyerror   date_error

Definition at line 115 of file parsedate.c.

◆ YYerror

#define YYerror   256

Definition at line 238 of file parsedate.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 814 of file parsedate.c.

◆ YYFINAL

#define YYFINAL   2

Definition at line 608 of file parsedate.c.

◆ YYFREE

#define YYFREE   free

Definition at line 539 of file parsedate.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 977 of file parsedate.c.

◆ YYLAST

#define YYLAST   40

Definition at line 610 of file parsedate.c.

◆ yylex

#define yylex   date_lex

Definition at line 114 of file parsedate.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 533 of file parsedate.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 988 of file parsedate.c.

◆ YYMAXUTOK

#define YYMAXUTOK   266

Definition at line 622 of file parsedate.c.

◆ YYNNTS

#define YYNNTS   9

Definition at line 615 of file parsedate.c.

◆ YYNRULES

#define YYNRULES   30

Definition at line 617 of file parsedate.c.

◆ YYNSTATES

#define YYNSTATES   44

Definition at line 619 of file parsedate.c.

◆ YYNTOKENS

#define YYNTOKENS   15

Definition at line 613 of file parsedate.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-29)

Definition at line 711 of file parsedate.c.

◆ yypact_value_is_default

#define yypact_value_is_default (   Yyn)     ((Yyn) == YYPACT_NINF)

Definition at line 713 of file parsedate.c.

◆ yyparse

#define yyparse   date_parse

Definition at line 113 of file parsedate.c.

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 378 of file parsedate.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 377 of file parsedate.c.

◆ YYPULL

#define YYPULL   1

Definition at line 64 of file parsedate.c.

◆ YYPURE

#define YYPURE   0

Definition at line 58 of file parsedate.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 61 of file parsedate.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 817 of file parsedate.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition: parsedate.c:378
#define YY_CAST(Type, Val)
Definition: parsedate.c:190
#define YYSIZE_T
Definition: parsedate.c:391

Definition at line 395 of file parsedate.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 391 of file parsedate.c.

◆ YYSIZEOF

#define YYSIZEOF (   X)    YY_CAST (YYPTRDIFF_T, sizeof (X))

Definition at line 401 of file parsedate.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 55 of file parsedate.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 519 of file parsedate.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 522 of file parsedate.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
#define YYSIZEOF(X)
Definition: parsedate.c:401
yytype_int8 yy_state_t
Definition: parsedate.c:405
#define YYSTACK_GAP_MAXIMUM
Definition: parsedate.c:559

Definition at line 563 of file parsedate.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 520 of file parsedate.c.

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)

Definition at line 559 of file parsedate.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)

Definition at line 574 of file parsedate.c.

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

Definition at line 264 of file parsedate.c.

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 263 of file parsedate.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-1)

Definition at line 716 of file parsedate.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 718 of file parsedate.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 217 of file parsedate.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
static const yytype_int8 yytranslate[]
Definition: parsedate.c:634
yysymbol_kind_t
Definition: parsedate.c:275
@ YYSYMBOL_YYUNDEF
Definition: parsedate.c:279
#define YYMAXUTOK
Definition: parsedate.c:622

Definition at line 627 of file parsedate.c.

◆ YYUNDEF

#define YYUNDEF   257

Definition at line 239 of file parsedate.c.

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Definition at line 441 of file parsedate.c.

Typedef Documentation

◆ DSTMODE

typedef enum _DSTMODE DSTMODE

◆ MERIDIAN

typedef enum _MERIDIAN MERIDIAN

◆ TABLE

typedef struct _TABLE TABLE

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 408 of file parsedate.c.

◆ yy_state_t

Definition at line 405 of file parsedate.c.

◆ YYSTYPE

typedef union YYSTYPE YYSTYPE

Definition at line 262 of file parsedate.c.

◆ yysymbol_kind_t

Definition at line 302 of file parsedate.c.

◆ yytoken_kind_t

Definition at line 234 of file parsedate.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 341 of file parsedate.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 333 of file parsedate.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 361 of file parsedate.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 350 of file parsedate.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 807 of file parsedate.c.

◆ _DSTMODE

enum _DSTMODE
Enumerator
DSTon 
DSToff 
DSTmaybe 

Definition at line 147 of file parsedate.c.

◆ _MERIDIAN

enum _MERIDIAN
Enumerator
MERam 
MERpm 
MER24 

Definition at line 154 of file parsedate.c.

◆ yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_tDAY 
YYSYMBOL_tDAYZONE 
YYSYMBOL_tMERIDIAN 
YYSYMBOL_tMONTH 
YYSYMBOL_tMONTH_UNIT 
YYSYMBOL_tSEC_UNIT 
YYSYMBOL_tSNUMBER 
YYSYMBOL_tUNUMBER 
YYSYMBOL_tZONE 
YYSYMBOL_12_ 
YYSYMBOL_13_ 
YYSYMBOL_14_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_spec 
YYSYMBOL_item 
YYSYMBOL_time 
YYSYMBOL_zone 
YYSYMBOL_numzone 
YYSYMBOL_date 
YYSYMBOL_rel 
YYSYMBOL_o_merid 

Definition at line 274 of file parsedate.c.

◆ yytokentype

Enumerator
YYEMPTY 
YYEOF 
YYerror 
YYUNDEF 
tDAY 
tDAYZONE 
tMERIDIAN 
tMONTH 
tMONTH_UNIT 
tSEC_UNIT 
tSNUMBER 
tUNUMBER 
tZONE 

Definition at line 218 of file parsedate.c.

Function Documentation

◆ Convert()

static time_t Convert ( time_t  Month,
time_t  Day,
time_t  Year,
time_t  Hours,
time_t  Minutes,
time_t  Seconds,
MERIDIAN  Meridian,
DSTMODE  dst 
)
static

Definition at line 1938 of file parsedate.c.

References DST_OFFSET, DSTmaybe, DSTon, END_OF_TIME, ENDOF, EPOCH, SECSPERDAY, ToSeconds(), and yyTimezone.

Referenced by parsedate(), and RelativeMonth().

◆ date_error()

static void date_error ( char *  s)
static

Definition at line 1910 of file parsedate.c.

◆ date_lex()

int date_lex ( void  )

Definition at line 2114 of file parsedate.c.

References IS7BIT, LookupWord(), LPAREN, YYSTYPE::Number, RPAREN, tSNUMBER, tUNUMBER, yyInput, and yylval.

◆ date_parse()

◆ DSTcorrect()

static time_t DSTcorrect ( time_t  Start,
time_t  Future 
)
static

Definition at line 1994 of file parsedate.c.

References DST_OFFSET.

Referenced by RelativeMonth().

◆ free()

void free ( void *  )

Referenced by add_to_chat_queue(), attach_extauth(), cdb_decompress_if_necessary(), cdb_free(), cdb_store(), CM_CopyField(), CM_FlushField(), CM_Free(), CM_FreeContents(), CM_PrependToField(), CM_SetAsField(), CM_SetAsFieldSB(), CM_SetField(), cmd_auto(), cmd_conf(), cmd_cre8(), cmd_dele(), cmd_ent0(), cmd_gexp(), cmd_gnet(), cmd_gvdn(), cmd_move(), cmd_pibr(), cmd_rwho(), cmd_sexp(), cmd_srch(), cmd_ulri(), cmd_ului(), cmd_writ(), CmdAdjust(), context_cleanup(), convert_field(), convert_internet_message(), convert_legacy_netcfg_files(), CopyNewUserGreetings(), CtdlDeleteMessages(), CtdlForEachMessage(), CtdlGetCachedFloor(), CtdlLocateMessageByEuid(), CtdlLoginExistingUser(), CtdlPutFloor(), CtdlRegisterServiceHook(), CtdlSaveMsgPointersInRoom(), CtdlSaveThisMessage(), CtdlSetConfigStr(), CtdlSetSeen(), CtdlTryPassword(), CtdlUnregisterDeleteHook(), CtdlUnregisterFixedOutputHook(), CtdlUnregisterMessageHook(), CtdlUnregisterRoomHook(), CtdlUnregisterSearchFuncHook(), CtdlUnregisterServiceHook(), CtdlUnregisterSessionHook(), CtdlUnregisterUserHook(), CtdlUnregisterXmsgHook(), CtdlUserGoto(), dead_session_purge(), delete_instant_messages(), deserialize_inbox_rules(), do_confirm(), do_fulltext_indexing(), extract_inet_email_addrs(), fixed_output(), flush_conversations_to_disk(), ForEachUser(), Free_ctdl_openid(), free_inbox_rules(), free_recipients(), ft_flush_cache(), ft_index_message(), ft_search(), GatherPurgeMessages(), harvest_collected_addresses(), hunt_for_autocomplete(), ical_fixed_output(), ical_freebusy(), ical_getics(), ical_putics(), ical_send_a_reply(), ical_send_out_invitations(), ical_session_shutdown(), ical_update_my_calendar_with_reply(), ical_write_to_cal(), imap_cleanup_function(), imap_create(), imap_do_copy(), imap_do_expunge(), imap_do_search(), imap_do_search_msg(), imap_do_store(), imap_fetch(), imap_fetch_body(), imap_fetch_bodystructure(), imap_fetch_envelope(), imap_free_msgids(), imap_list(), imap_rename(), imap_rescan_msgids(), imap_store(), imap_strip_headers(), imap_uidfetch(), imap_uidstore(), import_one_bio_file(), import_one_userpic_file(), inbox_do_reject(), index_message_by_euid(), inetcfg_setTo(), ingest_old_roominfo_and_roompic_files(), InitialMailCheck(), iorarf_backend(), iorarf_oneroom(), is_email_subscribed_to_list(), JournalRunQueueMsg(), listdeliver_sweep_room(), main(), migr_export_message(), migr_restore_message_metadata(), migr_xml_end(), migr_xml_start(), nntp_cleanup_function(), output_preferred(), output_roomname_in_list_format(), OutputRFC822MsgHeaders(), perform_inbox_processing(), pop3_cleanup_function(), pop3_update(), pop3client_scan(), pop3client_scan_room(), PurgeEuidIndexTable(), PurgeRooms(), PurgeUsers(), PurgeUseTable(), PurgeVisits(), qp_encode_email_addrs(), rblcheck_backend(), rebuild_euid_index_for_room(), RemoveContext(), roomchat_rwho(), roomchat_timer(), rss_end_element(), rss_pull_feeds(), rss_start_element(), rssclient_scan_room(), SaveRoomNetConfigFile(), smtp_attempt_delivery(), smtp_cleanup_function(), smtp_process_one_msg(), smtp_webcit_preferences_hack(), split_recps(), store_this_ha(), validate_recipients(), vcard_fixed_output(), vcard_set_one_prop_iff_different(), vcard_upload_beforesave(), vcard_write_user(), wiki_rev(), wiki_upload_beforesave(), xmpp_cleanup_function(), xmpp_delete_old_buddies_who_no_longer_exist_from_the_client_roster(), xmpp_iq_roster_query(), xmpp_massacre_roster(), xmpp_output_incoming_messages(), xmpp_presence_notify(), xmpp_queue_event(), xmpp_send_message(), xmpp_wholist_presence_dump(), and xmpp_xml_end().

◆ LookupWord()

static int LookupWord ( char *  buff,
register int  length 
)
static

◆ malloc()

void * malloc ( unsigned  )

Referenced by add_to_chat_queue(), AddValidRoom(), AddValidUser(), attach_extauth(), cdb_decompress_if_necessary(), cdb_fetch(), cdb_next_item(), cdb_store(), CloneContext(), CM_CopyField(), CM_DupField(), CM_Duplicate(), CM_PrependToField(), CM_SetField(), cmd_conf(), cmd_cre8(), cmd_dele(), cmd_ent0(), cmd_move(), cmd_msgs(), cmd_oids(), cmd_reqt(), cmd_sexp(), cmd_ulri(), cmd_ului(), cmd_writ(), CmdAdjust(), convert_field(), convert_internet_message_buf(), convert_legacy_netcfg_files(), CopyNewUserGreetings(), CreateNewContext(), CTC_backend(), CtdlDeleteMessages(), CtdlDeserializeMessage(), CtdlGetCachedFloor(), CtdlGetContextArray(), CtdlLocateMessageByEuid(), CtdlMakeMessageLen(), CtdlPutFloor(), CtdlRegisterDeleteHook(), CtdlRegisterFixedOutputHook(), CtdlRegisterMessageHook(), CtdlRegisterProtoHook(), CtdlRegisterRoomHook(), CtdlRegisterSearchFuncHook(), CtdlRegisterServiceHook(), CtdlRegisterSessionHook(), CtdlRegisterUserHook(), CtdlRegisterXmsgHook(), CtdlSaveMsgPointersInRoom(), CtdlSerializeMessage(), CtdlSetConfigStr(), CtdlSetSeen(), CtdlSubmitMsg(), CtdlTryPassword(), CtdlWriteObject(), deserialize_inbox_rules(), do_confirm(), do_user_purge(), DoPurgeRooms(), extract_encapsulated_message(), flush_individual_conversation(), ForEachUser(), ft_index_message(), ft_search(), GatherPurgeMessages(), ical_fixed_output(), ical_send_a_reply(), ical_send_out_invitations(), ical_session_startup(), ical_update_my_calendar_with_reply(), ical_write_to_cal(), imap_create(), imap_do_copy(), imap_do_expunge(), imap_do_store(), imap_fetch_envelope(), imap_greeting(), imap_list(), imap_load_msgids(), imap_rename_backend(), import_one_bio_file(), import_one_userpic_file(), inbox_do_reject(), index_message_by_euid(), InitialMailCheck(), iorarf_backend(), iorarf_oneroom(), JournalBackgroundSubmit(), JournalRunQueueMsg(), listdeliver_do_msg(), listdeliver_sweep_room(), LoadRoomNetConfigFile(), log_instant_message(), migr_xml_end(), n_to_fn(), nntp_greeting(), pop3_add_message(), pop3_greeting(), pop3_update(), pop3client_scan_room(), PurgeEuidIndexTable(), PurgeRooms(), PurgeUsers(), PurgeUseTable(), PurgeVisits(), qp_encode_email_addrs(), quickie_message(), rblcheck_backend(), rebuild_euid_index_for_room(), registerImapCMD(), rfc822_fetch_field(), rss_start_element(), rssclient_push_todo(), SaveRoomNetConfigFile(), send_instant_message(), serv_inboxrules_roomhook(), smtp_add_msg(), smtp_aftersave(), smtp_do_bounce(), smtp_greeting(), store_this_ha(), trim_response(), validate_recipients(), vcard_fixed_output(), wiki_rev(), wiki_upload_beforesave(), xmpp_greeting(), xmpp_queue_event(), and xmpp_xml_chardata().

◆ parsedate()

◆ RelativeMonth()

static time_t RelativeMonth ( time_t  Start,
time_t  RelMonth 
)
static

Definition at line 2006 of file parsedate.c.

References Convert(), DSTcorrect(), DSTmaybe, and MER24.

Referenced by parsedate().

◆ ToSeconds()

static time_t ToSeconds ( time_t  Hours,
time_t  Minutes,
time_t  Seconds,
MERIDIAN  Meridian 
)
static

Definition at line 1917 of file parsedate.c.

References MER24, and MERpm.

Referenced by Convert().

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
yysymbol_kind_t  yykind,
YYSTYPE yyvaluep 
)
static

Variable Documentation

◆ MonthDayTable

TABLE MonthDayTable[]
static
Initial value:
= {
{ "january", 261 , 1 },
{ "february", 261 , 2 },
{ "march", 261 , 3 },
{ "april", 261 , 4 },
{ "may", 261 , 5 },
{ "june", 261 , 6 },
{ "july", 261 , 7 },
{ "august", 261 , 8 },
{ "september", 261 , 9 },
{ "october", 261 , 10 },
{ "november", 261 , 11 },
{ "december", 261 , 12 },
{ "sunday", 258 , 0 },
{ "monday", 258 , 0 },
{ "tuesday", 258 , 0 },
{ "wednesday", 258 , 0 },
{ "thursday", 258 , 0 },
{ "friday", 258 , 0 },
{ "saturday", 258 , 0 },
}

Definition at line 1758 of file parsedate.c.

Referenced by LookupWord().

◆ TimezoneTable

TABLE TimezoneTable[]
static

Definition at line 1795 of file parsedate.c.

Referenced by LookupWord().

◆ UnitsTable

TABLE UnitsTable[]
static
Initial value:
= {
{ "year", 262 , 12 },
{ "month", 262 , 1 },
{ "week", 263 , 7L * 24 * 60 * 60 },
{ "day", 263 , 1L * 24 * 60 * 60 },
{ "hour", 263 , 60 * 60 },
{ "minute", 263 , 60 },
{ "min", 263 , 60 },
{ "second", 263 , 1 },
{ "sec", 263 , 1 },
}

Definition at line 1782 of file parsedate.c.

Referenced by LookupWord().

◆ yychar

int yychar

Definition at line 1016 of file parsedate.c.

Referenced by date_parse().

◆ yycheck

const yytype_int8 yycheck[]
static
Initial value:
=
{
24, 0, 30, 14, 3, 5, 30, 6, 4, 9,
9, 10, 40, 9, 9, 11, 40, 5, 6, 7,
8, 10, 5, 10, 12, 13, 9, 7, 8, 12,
14, 10, 10, 10, 6, 10, 10, 13, -1, 10,
10
}

Definition at line 768 of file parsedate.c.

Referenced by date_parse().

◆ yyDay

time_t yyDay
static

Definition at line 170 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
2, 0, 1, 0, 0, 0, 29, 3, 4, 6,
7, 0, 20, 27, 25, 30, 22, 28, 26, 0,
0, 8, 14, 17, 13, 5, 16, 0, 0, 23,
29, 18, 15, 0, 21, 0, 10, 9, 0, 24,
29, 19, 12, 11
}

Definition at line 735 of file parsedate.c.

Referenced by date_parse().

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 1, 7, 8, 25, 26, 9, 10, 21
}

Definition at line 751 of file parsedate.c.

Referenced by date_parse().

◆ yyDSTmode

DSTMODE yyDSTmode
static

Definition at line 165 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyHaveDate

int yyHaveDate
static

Definition at line 166 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyHaveRel

int yyHaveRel
static

Definition at line 167 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyHaveTime

int yyHaveTime
static

Definition at line 168 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyHour

time_t yyHour
static

Definition at line 171 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyInput

const char* yyInput
static

Definition at line 164 of file parsedate.c.

Referenced by date_lex(), and parsedate().

◆ yylval

YYSTYPE yylval

Definition at line 1019 of file parsedate.c.

Referenced by date_lex(), date_parse(), and LookupWord().

◆ yyMeridian

MERIDIAN yyMeridian
static

Definition at line 176 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyMinutes

time_t yyMinutes
static

Definition at line 172 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyMonth

time_t yyMonth
static

Definition at line 173 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yynerrs

int yynerrs

Definition at line 1021 of file parsedate.c.

Referenced by date_parse().

◆ yypact

const yytype_int8 yypact[]
static
Initial value:
=
{
-29, 1, -29, -11, 11, 20, 12, -29, 4, -29,
-29, 13, 16, -29, -29, -29, 21, -29, -29, 22,
23, -29, -29, -29, 5, -29, -29, 28, 25, -29,
17, 24, -29, 26, -29, 29, -29, -29, 30, -29,
0, -29, -29, -29
}

Definition at line 723 of file parsedate.c.

Referenced by date_parse().

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-29, -29, -29, -29, -29, -24, -29, -29, -28
}

Definition at line 745 of file parsedate.c.

Referenced by date_parse().

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
0, 15, 16, 16, 17, 17, 17, 17, 18, 18,
18, 18, 18, 19, 19, 19, 19, 20, 21, 21,
21, 21, 21, 21, 21, 22, 22, 22, 22, 23,
23
}

Definition at line 789 of file parsedate.c.

Referenced by date_parse().

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 0, 2, 1, 2, 1, 1, 2, 4,
4, 6, 6, 1, 1, 2, 1, 1, 3, 5,
2, 4, 2, 3, 5, 2, 2, 2, 2, 0,
1
}

Definition at line 798 of file parsedate.c.

Referenced by date_parse().

◆ yyRelMonth

time_t yyRelMonth
static

Definition at line 177 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yyRelSeconds

time_t yyRelSeconds
static

Definition at line 178 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yySeconds

time_t yySeconds
static

Definition at line 174 of file parsedate.c.

Referenced by date_parse(), and parsedate().

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 16, 0, 3, 6, 9, 10, 17, 18, 21,
22, 14, 10, 7, 8, 5, 6, 7, 8, 12,
13, 23, 4, 9, 11, 19, 20, 10, 14, 10,
10, 10, 20, 6, 10, 12, 20, 23, 13, 10,
10, 10, 20, 23
}

Definition at line 779 of file parsedate.c.

◆ yytable

const yytype_int8 yytable[]
static
Initial value:
=
{
32, 2, 37, 11, 3, 15, 36, 4, 22, 23,
5, 6, 43, 23, 23, 24, 42, 15, 16, 17,
18, 12, 15, 27, 19, 20, 23, 13, 14, 35,
28, 29, 30, 31, 33, 34, 39, 38, 0, 40,
41
}

Definition at line 759 of file parsedate.c.

Referenced by date_parse().

◆ yyTimezone

time_t yyTimezone
static

Definition at line 169 of file parsedate.c.

Referenced by Convert(), date_parse(), and parsedate().

◆ yytranslate

const yytype_int8 yytranslate[]
static
Initial value:
=
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 14, 2, 2, 13, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11
}

Definition at line 634 of file parsedate.c.

◆ yyYear

time_t yyYear
static

Definition at line 175 of file parsedate.c.

Referenced by date_parse(), and parsedate().