database.c cleanup
authorArt Cancro <ajc@citadel.org>
Tue, 7 Aug 2018 15:57:15 +0000 (11:57 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 7 Aug 2018 15:57:15 +0000 (11:57 -0400)
citadel/database.c
citadel/parsedate.c

index 566a0520dd895a3193c7d9912bb9ad0d675665f8..9a22c8d2c62a6ca7af9c819fdb879946db3b2db4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This is a data store backend for the Citadel server which uses Berkeley DB.
  *
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
@@ -56,19 +56,17 @@ static DB *dbp[MAXCDB];             /* One DB handle for each Citadel database */
 static DB_ENV *dbenv;          /* The DB environment (global) */
 
 
-void cdb_abort(void) {
+void cdb_abort(void)
+{
        syslog(LOG_DEBUG, "db: citserver is stopping in order to prevent data loss. uid=%d gid=%d euid=%d egid=%d",
-               getuid(),
-               getgid(),
-               geteuid(),
-               getegid()
+               getuid(), getgid(), geteuid(), getegid()
        );
        exit(CTDLEXIT_DB);
 }
 
 
 /* Verbose logging callback */
-void cdb_verbose_log(const DB_ENV *dbenv, const char *msg)
+void cdb_verbose_log(const DB_ENV * dbenv, const char *msg)
 {
        if (!IsEmptyStr(msg)) {
                syslog(LOG_DEBUG, "db: %s", msg);
@@ -77,11 +75,9 @@ void cdb_verbose_log(const DB_ENV *dbenv, const char *msg)
 
 
 /* Verbose logging callback */
-void cdb_verbose_err(const DB_ENV *dbenv, const char *errpfx, const char *msg)
+void cdb_verbose_err(const DB_ENV * dbenv, const char *errpfx, const char *msg)
 {
-       int *FOO = NULL;
        syslog(LOG_ERR, "db: %s", msg);
-       *FOO = 1;
 }
 
 
@@ -98,6 +94,7 @@ static void txabort(DB_TXN * tid)
        }
 }
 
+
 /* this one is even more helpful than the last. */
 static void txcommit(DB_TXN * tid)
 {
@@ -111,6 +108,7 @@ static void txcommit(DB_TXN * tid)
        }
 }
 
+
 /* are you sensing a pattern yet? */
 static void txbegin(DB_TXN ** tid)
 {
@@ -124,11 +122,13 @@ static void txbegin(DB_TXN ** tid)
        }
 }
 
+
 static void dbpanic(DB_ENV * env, int errval)
 {
        syslog(LOG_ERR, "db: PANIC: %s", db_strerror(errval));
 }
 
+
 static void cclose(DBC * cursor)
 {
        int ret;
@@ -139,6 +139,7 @@ static void cclose(DBC * cursor)
        }
 }
 
+
 static void bailIfCursor(DBC ** cursors, const char *msg)
 {
        int i;
@@ -168,6 +169,7 @@ void cdb_check_handles(void)
  */
 void cdb_cull_logs(void)
 {
+#ifndef DB_LOG_AUTO_REMOVE
        u_int32_t flags;
        int ret;
        char **file, **list;
@@ -193,13 +195,13 @@ void cdb_cull_logs(void)
                                         "database log file '%s' because of the "
                                         "following error:\n \n %s\n \n"
                                         " This log file is no longer in use "
-                                        "and may be safely deleted.\n",
-                                        *file, strerror(errno));
+                                        "and may be safely deleted.\n", *file, strerror(errno));
                                CtdlAideMessage(errmsg, "Database Warning Message");
                        }
                }
                free(list);
        }
+#endif /* DB_LOG_AUTO_REMOVE */
 }
 
 
@@ -221,9 +223,10 @@ void cdb_checkpoint(void)
        /* After a successful checkpoint, we can cull the unused logs */
        if (CtdlGetConfigInt("c_auto_cull")) {
 #ifdef DB_LOG_AUTO_REMOVE
-               ret = dbenv->log_set_config(dbenv, DB_LOG_AUTO_REMOVE, 1);      // This version of Berkeley DB can cull the logs on its own!
+               // This version of Berkeley DB can cull the logs on its own!
+               ret = dbenv->log_set_config(dbenv, DB_LOG_AUTO_REMOVE, 1);
 #else
-               cdb_cull_logs();                                                // Citadel knows how to do it too.
+               cdb_cull_logs();        // Citadel knows how to do it too.
 #endif
        }
 #ifdef DB_LOG_AUTO_REMOVE
@@ -234,7 +237,6 @@ void cdb_checkpoint(void)
 }
 
 
-
 /*
  * Open the various databases we'll be using.  Any database which
  * does not exist should be created.  Note that we don't need a
@@ -258,13 +260,13 @@ void open_databases(void)
         * Silently try to create the database subdirectory.  If it's
         * already there, no problem.
         */
-       if ((mkdir(ctdl_data_dir, 0700) != 0) && (errno != EEXIST)){
+       if ((mkdir(ctdl_data_dir, 0700) != 0) && (errno != EEXIST)) {
                syslog(LOG_ERR, "db: unable to create database directory [%s]: %m", ctdl_data_dir);
        }
-       if (chmod(ctdl_data_dir, 0700) != 0){
+       if (chmod(ctdl_data_dir, 0700) != 0) {
                syslog(LOG_ERR, "db: unable to set database directory accessrights [%s]: %m", ctdl_data_dir);
        }
-       if (chown(ctdl_data_dir, CTDLUID, (-1)) != 0){
+       if (chown(ctdl_data_dir, CTDLUID, (-1)) != 0) {
                syslog(LOG_ERR, "db: unable to set the owner for [%s]: %m", ctdl_data_dir);
        }
        syslog(LOG_DEBUG, "db: Setting up DB environment\n");
@@ -343,18 +345,12 @@ void open_databases(void)
                 */
                snprintf(dbfilename, sizeof dbfilename, "cdb.%02x", i);
 
-               ret = dbp[i]->open(dbp[i],
-                                  NULL,
-                                  dbfilename,
-                                  NULL,
-                                  DB_BTREE,
-                                  DB_CREATE | DB_AUTO_COMMIT | DB_THREAD,
-                                  0600
-               );
+               ret = dbp[i]->open(dbp[i], NULL, dbfilename, NULL, DB_BTREE, DB_CREATE | DB_AUTO_COMMIT | DB_THREAD, 0600);
                if (ret) {
                        syslog(LOG_ERR, "db: db_open[%02x]: %s", i, db_strerror(ret));
                        if (ret == ENOMEM) {
-                               syslog(LOG_ERR, "db: You may need to tune your database; please read http://www.citadel.org/doku.php?id=faq:troubleshooting:out_of_lock_entries for more information.");
+                               syslog(LOG_ERR,
+                                      "db: You may need to tune your database; please read http://www.citadel.org/doku.php?id=faq:troubleshooting:out_of_lock_entries for more information.");
                        }
                        syslog(LOG_ERR, "db: exit code %d", ret);
                        exit(CTDLEXIT_DB);
@@ -367,7 +363,8 @@ void open_databases(void)
 /* Make sure we own all the files, because in a few milliseconds
  * we're going to drop root privs.
  */
-void cdb_chmod_data(void) {
+void cdb_chmod_data(void)
+{
        DIR *dp;
        struct dirent *d;
        char filename[PATH_MAX];
@@ -439,11 +436,9 @@ void cdb_decompress_if_necessary(struct cdbdata *cdb)
 {
        static int magic = COMPRESS_MAGIC;
 
-       if ((cdb == NULL) || 
-           (cdb->ptr == NULL) || 
-           (cdb->len < sizeof(magic)) ||
-           (memcmp(cdb->ptr, &magic, sizeof(magic))))
-           return;
+       if ((cdb == NULL) || (cdb->ptr == NULL) || (cdb->len < sizeof(magic)) || (memcmp(cdb->ptr, &magic, sizeof(magic)))) {
+               return;
+       }
 
        /* At this point we know we're looking at a compressed item. */
 
@@ -467,10 +462,7 @@ void cdb_decompress_if_necessary(struct cdbdata *cdb)
        uncompressed_data = malloc(zheader.uncompressed_len);
 
        if (uncompress((Bytef *) uncompressed_data,
-                      (uLongf *) & destLen,
-                      (const Bytef *) compressed_data,
-                      (uLong) sourceLen) != Z_OK)
-       {
+                      (uLongf *) & destLen, (const Bytef *) compressed_data, (uLong) sourceLen) != Z_OK) {
                syslog(LOG_EMERG, "db: uncompress() error");
                cdb_abort();
        }
@@ -501,12 +493,12 @@ int cdb_store(int cdb, const void *ckey, int ckeylen, void *cdata, int cdatalen)
        memset(&dkey, 0, sizeof(DBT));
        memset(&ddata, 0, sizeof(DBT));
        dkey.size = ckeylen;
-       dkey.data = (void *)ckey;
+       dkey.data = (void *) ckey;
        ddata.size = cdatalen;
        ddata.data = cdata;
 
        /* Only compress Visit and UseTable records.  Everything else is uncompressed. */
-       if ( (cdb == CDB_VISIT) || (cdb == CDB_USETABLE) ) {
+       if ((cdb == CDB_VISIT) || (cdb == CDB_USETABLE)) {
                compressing = 1;
                zheader.magic = COMPRESS_MAGIC;
                zheader.uncompressed_len = cdatalen;
@@ -514,8 +506,7 @@ int cdb_store(int cdb, const void *ckey, int ckeylen, void *cdata, int cdatalen)
                destLen = (uLongf) buffer_len;
                compressed_data = malloc(buffer_len);
                if (compress2((Bytef *) (compressed_data + sizeof(struct CtdlCompressHeader)),
-                       &destLen, (Bytef *) cdata, (uLongf) cdatalen, 1) != Z_OK)
-               {
+                             &destLen, (Bytef *) cdata, (uLongf) cdatalen, 1) != Z_OK) {
                        syslog(LOG_EMERG, "db: compress2() error");
                        cdb_abort();
                }
@@ -530,16 +521,17 @@ int cdb_store(int cdb, const void *ckey, int ckeylen, void *cdata, int cdatalen)
                                    TSD->tid,   /* transaction ID */
                                    &dkey,      /* key */
                                    &ddata,     /* data */
-                                   0); /* flags */
+                                   0           /* flags */
+               );
                if (ret) {
                        syslog(LOG_EMERG, "db: cdb_store(%d): %s", cdb, db_strerror(ret));
                        cdb_abort();
                }
-               if (compressing)
+               if (compressing) {
                        free(compressed_data);
+               }
                return ret;
-       }
-       else {
+       } else {
                bailIfCursor(TSD->cursors, "attempt to write during r/o cursor");
 
              retry:
@@ -597,8 +589,7 @@ int cdb_delete(int cdb, void *key, int keylen)
              retry:
                txbegin(&tid);
 
-               if ((ret = dbp[cdb]->del(dbp[cdb], tid, &dkey, 0))
-                   && ret != DB_NOTFOUND) {
+               if ((ret = dbp[cdb]->del(dbp[cdb], tid, &dkey, 0)) && ret != DB_NOTFOUND) {
                        if (ret == DB_LOCK_DEADLOCK) {
                                txabort(tid);
                                goto retry;
@@ -613,15 +604,18 @@ int cdb_delete(int cdb, void *key, int keylen)
        return ret;
 }
 
+
 static DBC *localcursor(int cdb)
 {
        int ret;
        DBC *curs;
 
-       if (TSD->cursors[cdb] == NULL)
+       if (TSD->cursors[cdb] == NULL) {
                ret = dbp[cdb]->cursor(dbp[cdb], TSD->tid, &curs, 0);
-       else
+       }
+       else {
                ret = TSD->cursors[cdb]->c_dup(TSD->cursors[cdb], &curs, DB_POSITION);
+       }
 
        if (ret) {
                syslog(LOG_EMERG, "db: localcursor: %s", db_strerror(ret));
@@ -645,7 +639,7 @@ struct cdbdata *cdb_fetch(int cdb, const void *key, int keylen)
 
        memset(&dkey, 0, sizeof(DBT));
        dkey.size = keylen;
-       dkey.data = (void *)key;
+       dkey.data = (void *) key;
 
        if (TSD->tid != NULL) {
                memset(&dret, 0, sizeof(DBT));
@@ -672,17 +666,17 @@ struct cdbdata *cdb_fetch(int cdb, const void *key, int keylen)
                cdb_abort();
        }
 
-       if (ret != 0)
+       if (ret != 0) {
                return NULL;
+       }
+
        tempcdb = (struct cdbdata *) malloc(sizeof(struct cdbdata));
 
        if (tempcdb == NULL) {
                syslog(LOG_EMERG, "db: cdb_fetch: Cannot allocate memory for tempcdb");
                cdb_abort();
-               return NULL; /* make it easier for static analysis... */
-       }
-       else
-       {
+               return NULL;    /* make it easier for static analysis... */
+       } else {
                tempcdb->len = dret.size;
                tempcdb->ptr = dret.data;
                cdb_decompress_if_necessary(tempcdb);
@@ -707,6 +701,7 @@ void cdb_free(struct cdbdata *cdb)
        free(cdb);
 }
 
+
 void cdb_close_cursor(int cdb)
 {
        if (TSD->cursors[cdb] != NULL) {
@@ -716,6 +711,7 @@ void cdb_close_cursor(int cdb)
        TSD->cursors[cdb] = NULL;
 }
 
+
 /* 
  * Prepare for a sequential search of an entire database.
  * (There is guaranteed to be no more than one traversal in
@@ -777,11 +773,9 @@ struct cdbdata *cdb_next_item(int cdb)
 }
 
 
-
 /*
  * Transaction-based stuff.  I'm writing this as I bake cookies...
  */
-
 void cdb_begin_transaction(void)
 {
 
@@ -795,6 +789,7 @@ void cdb_begin_transaction(void)
        txbegin(&TSD->tid);
 }
 
+
 void cdb_end_transaction(void)
 {
        int i;
@@ -809,14 +804,14 @@ void cdb_end_transaction(void)
        if (TSD->tid == NULL) {
                syslog(LOG_ERR, "db: cdb_end_transaction: ERROR: txcommit(NULL) !!");
                cdb_abort();
-       }
-       else {
+       } else {
                txcommit(TSD->tid);
        }
 
        TSD->tid = NULL;
 }
 
+
 /*
  * Truncate (delete every record)
  */
@@ -829,8 +824,7 @@ void cdb_trunc(int cdb)
        if (TSD->tid != NULL) {
                syslog(LOG_EMERG, "db: cdb_trunc must not be called in a transaction.");
                cdb_abort();
-       }
-       else {
+       } else {
                bailIfCursor(TSD->cursors, "attempt to write during r/o cursor");
 
              retry:
@@ -846,7 +840,8 @@ void cdb_trunc(int cdb)
                        } else {
                                syslog(LOG_EMERG, "db: cdb_truncate(%d): %s", cdb, db_strerror(ret));
                                if (ret == ENOMEM) {
-                                       syslog(LOG_EMERG, "db: You may need to tune your database; please read http://www.citadel.org/doku.php?id=faq:troubleshooting:out_of_lock_entries for more information.");
+                                       syslog(LOG_EMERG,
+                                              "db: You may need to tune your database; please read http://www.citadel.org/doku.php?id=faq:troubleshooting:out_of_lock_entries for more information.");
                                }
                                exit(CTDLEXIT_DB);
                        }
@@ -898,64 +893,59 @@ int CheckIfAlreadySeen(StrBuf *guid)
        memcpy(ut.ut_msgid, SKEY(guid));
        ut.ut_timestamp = time(NULL);
        cdb_store(CDB_USETABLE, SKEY(guid), &ut, sizeof(struct UseTable));
-       return(found);
+       return (found);
 }
 
 
-void cmd_rsen(char *argbuf) {
+void cmd_rsen(char *argbuf)
+{
        char Token[SIZ];
        long TLen;
        char Time[SIZ];
 
        struct UseTable ut;
        struct cdbdata *cdbut;
-       
-       if (CtdlAccessCheck(ac_aide)) return;
+
+       if (CtdlAccessCheck(ac_aide)) {
+               return;
+       }
 
        TLen = extract_token(Token, argbuf, 1, '|', sizeof Token);
        if (strncmp(argbuf, "GET", 3) == 0) {
                cdbut = cdb_fetch(CDB_USETABLE, Token, TLen);
                if (cdbut != NULL) {
-                       memcpy(&ut, cdbut->ptr,
-                              ((cdbut->len > sizeof(struct UseTable)) ?
-                               sizeof(struct UseTable) : cdbut->len));
-                       
+                       memcpy(&ut, cdbut->ptr, ((cdbut->len > sizeof(struct UseTable)) ? sizeof(struct UseTable) : cdbut->len));
+
                        cprintf("%d %ld\n", CIT_OK, ut.ut_timestamp);
-               }
-               else {
+               } else {
                        cprintf("%d not found\n", ERROR + NOT_HERE);
                }
 
-       }
-       else if (strncmp(argbuf, "SET", 3) == 0) {
+       } else if (strncmp(argbuf, "SET", 3) == 0) {
                memcpy(ut.ut_msgid, Token, TLen);
                extract_token(Time, argbuf, 2, '|', sizeof Time);
                ut.ut_timestamp = atol(Time);
-               cdb_store(CDB_USETABLE,
-                         Token, TLen,
-                         &ut, sizeof(struct UseTable) );
+               cdb_store(CDB_USETABLE, Token, TLen, &ut, sizeof(struct UseTable));
                cprintf("%d token updated\n", CIT_OK);
-       }
-       else if (strncmp(argbuf, "DEL", 3) == 0) {
+       } else if (strncmp(argbuf, "DEL", 3) == 0) {
                if (cdb_delete(CDB_USETABLE, Token, TLen))
                        cprintf("%d not found\n", ERROR + NOT_HERE);
                else
                        cprintf("%d deleted.\n", CIT_OK);
 
-       }
-       else {
+       } else {
                cprintf("%d Usage: [GET|SET|DEL]|Token|timestamp\n", ERROR);
        }
 
 }
 
+
 CTDL_MODULE_INIT(database)
 {
-       if (!threading)
-       {
+       if (!threading) {
                CtdlRegisterProtoHook(cmd_rsen, "RSEN", "manipulate Aggregators seen database");
        }
 
        /* return our module id for the log */
-       return "database";
+       return "database";
 }
index f26fd4a4b052a259617b7fadb8c2611e66ac36a3..af4f0557859712367feffbd3d23bd984ad230d9a 100644 (file)
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2.  */
+/* A Bison parser, made by GNU Bison 3.0.4.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.0.4"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -231,7 +231,7 @@ extern int yydebug;
 
 /* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE YYSTYPE;
+
 union YYSTYPE
 {
 #line 114 "parsedate.y" /* yacc.c:355  */
@@ -241,6 +241,8 @@ union YYSTYPE
 
 #line 243 "y.tab.c" /* yacc.c:355  */
 };
+
+typedef union YYSTYPE YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define YYSTYPE_IS_DECLARED 1
 #endif
@@ -254,7 +256,7 @@ int yyparse (void);
 
 /* Copy the second part of user declarations.  */
 
-#line 258 "y.tab.c" /* yacc.c:358  */
+#line 260 "y.tab.c" /* yacc.c:358  */
 
 #ifdef short
 # undef short
@@ -1360,7 +1362,7 @@ yyreduce:
            }
 #endif /* lint */
        }
-#line 1364 "y.tab.c" /* yacc.c:1646  */
+#line 1366 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 5:
@@ -1369,7 +1371,7 @@ yyreduce:
            yyHaveTime++;
            yyTimezone = (yyvsp[0].Number);
        }
-#line 1373 "y.tab.c" /* yacc.c:1646  */
+#line 1375 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 6:
@@ -1377,7 +1379,7 @@ yyreduce:
     {
            yyHaveDate++;
        }
-#line 1381 "y.tab.c" /* yacc.c:1646  */
+#line 1383 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 7:
@@ -1385,7 +1387,7 @@ yyreduce:
     {
            yyHaveRel = 1;
        }
-#line 1389 "y.tab.c" /* yacc.c:1646  */
+#line 1391 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 8:
@@ -1402,7 +1404,7 @@ yyreduce:
            yySeconds = 0;
            yyMeridian = (yyvsp[0].Meridian);
        }
-#line 1406 "y.tab.c" /* yacc.c:1646  */
+#line 1408 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 9:
@@ -1413,7 +1415,7 @@ yyreduce:
            yySeconds = 0;
            yyMeridian = (yyvsp[0].Meridian);
        }
-#line 1417 "y.tab.c" /* yacc.c:1646  */
+#line 1419 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 10:
@@ -1425,7 +1427,7 @@ yyreduce:
            yyMeridian = MER24;
            yyDSTmode = DSToff;
        }
-#line 1429 "y.tab.c" /* yacc.c:1646  */
+#line 1431 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 11:
@@ -1436,7 +1438,7 @@ yyreduce:
            yySeconds = (yyvsp[-1].Number);
            yyMeridian = (yyvsp[0].Meridian);
        }
-#line 1440 "y.tab.c" /* yacc.c:1646  */
+#line 1442 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 12:
@@ -1449,7 +1451,7 @@ yyreduce:
            yyMeridian = MER24;
            yyDSTmode = DSToff;
        }
-#line 1453 "y.tab.c" /* yacc.c:1646  */
+#line 1455 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 13:
@@ -1458,7 +1460,7 @@ yyreduce:
            (yyval.Number) = (yyvsp[0].Number);
            yyDSTmode = DSToff;
        }
-#line 1462 "y.tab.c" /* yacc.c:1646  */
+#line 1464 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 14:
@@ -1467,7 +1469,7 @@ yyreduce:
            (yyval.Number) = (yyvsp[0].Number);
            yyDSTmode = DSTon;
        }
-#line 1471 "y.tab.c" /* yacc.c:1646  */
+#line 1473 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 15:
@@ -1480,7 +1482,7 @@ yyreduce:
            (yyval.Number) = (yyvsp[0].Number);
            yyDSTmode = DSToff;
        }
-#line 1484 "y.tab.c" /* yacc.c:1646  */
+#line 1486 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 16:
@@ -1489,7 +1491,7 @@ yyreduce:
            (yyval.Number) = (yyvsp[0].Number);
            yyDSTmode = DSToff;
        }
-#line 1493 "y.tab.c" /* yacc.c:1646  */
+#line 1495 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 17:
@@ -1513,7 +1515,7 @@ yyreduce:
                (yyval.Number) = -(((yyvsp[0].Number) / 100) * 60 + i);
            }
        }
-#line 1517 "y.tab.c" /* yacc.c:1646  */
+#line 1519 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 18:
@@ -1522,7 +1524,7 @@ yyreduce:
            yyMonth = (yyvsp[-2].Number);
            yyDay = (yyvsp[0].Number);
        }
-#line 1526 "y.tab.c" /* yacc.c:1646  */
+#line 1528 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 19:
@@ -1539,7 +1541,7 @@ yyreduce:
                yyYear = (yyvsp[0].Number);
            }
        }
-#line 1543 "y.tab.c" /* yacc.c:1646  */
+#line 1545 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 20:
@@ -1548,7 +1550,7 @@ yyreduce:
            yyMonth = (yyvsp[-1].Number);
            yyDay = (yyvsp[0].Number);
        }
-#line 1552 "y.tab.c" /* yacc.c:1646  */
+#line 1554 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 21:
@@ -1558,7 +1560,7 @@ yyreduce:
            yyDay = (yyvsp[-2].Number);
            yyYear = (yyvsp[0].Number);
        }
-#line 1562 "y.tab.c" /* yacc.c:1646  */
+#line 1564 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 22:
@@ -1567,7 +1569,7 @@ yyreduce:
            yyDay = (yyvsp[-1].Number);
            yyMonth = (yyvsp[0].Number);
        }
-#line 1571 "y.tab.c" /* yacc.c:1646  */
+#line 1573 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 23:
@@ -1577,7 +1579,7 @@ yyreduce:
            yyMonth = (yyvsp[-1].Number);
            yyYear = (yyvsp[0].Number);
        }
-#line 1581 "y.tab.c" /* yacc.c:1646  */
+#line 1583 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 24:
@@ -1587,7 +1589,7 @@ yyreduce:
            yyMonth = (yyvsp[-1].Number);
            yyYear = (yyvsp[0].Number);
        }
-#line 1591 "y.tab.c" /* yacc.c:1646  */
+#line 1593 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 25:
@@ -1595,7 +1597,7 @@ yyreduce:
     {
            yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number);
        }
-#line 1599 "y.tab.c" /* yacc.c:1646  */
+#line 1601 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 26:
@@ -1603,7 +1605,7 @@ yyreduce:
     {
            yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number);
        }
-#line 1607 "y.tab.c" /* yacc.c:1646  */
+#line 1609 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 27:
@@ -1611,7 +1613,7 @@ yyreduce:
     {
            yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number);
        }
-#line 1615 "y.tab.c" /* yacc.c:1646  */
+#line 1617 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 28:
@@ -1619,7 +1621,7 @@ yyreduce:
     {
            yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number);
        }
-#line 1623 "y.tab.c" /* yacc.c:1646  */
+#line 1625 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 29:
@@ -1627,7 +1629,7 @@ yyreduce:
     {
            (yyval.Meridian) = MER24;
        }
-#line 1631 "y.tab.c" /* yacc.c:1646  */
+#line 1633 "y.tab.c" /* yacc.c:1646  */
     break;
 
   case 30:
@@ -1635,11 +1637,11 @@ yyreduce:
     {
            (yyval.Meridian) = (yyvsp[0].Meridian);
        }
-#line 1639 "y.tab.c" /* yacc.c:1646  */
+#line 1641 "y.tab.c" /* yacc.c:1646  */
     break;
 
 
-#line 1643 "y.tab.c" /* yacc.c:1646  */
+#line 1645 "y.tab.c" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires