]> code.citadel.org Git - citadel.git/blobdiff - citadel/parsedate.y
TDAP: increase usetable flush time to 10 days
[citadel.git] / citadel / parsedate.y
index b68ca4c24728c9c1c857386b92d135ae63a16307..f3e94ef7654fd3b8e28d52b038318650bc119d1f 100644 (file)
@@ -102,7 +102,7 @@ typedef enum _MERIDIAN {
 **  union, but this is more efficient.  (This routine predates the
 **  yacc %union construct.)
 */
-static char    *yyInput;
+static const char      *yyInput;
 static DSTMODE yyDSTmode;
 static int     yyHaveDate;
 static int     yyHaveRel;
@@ -730,12 +730,12 @@ date_lex(void)
 
 
 time_t
-parsedate(char *p)
+parsedate(const char *p)
 {
     extern int         date_parse(void);
     time_t             Start;
 
-    yyInput = p;
+    yyInput = p; /* well, its supposed to be const... */
 
     yyYear = 0;
     yyMonth = 0;
@@ -795,7 +795,7 @@ main(int ac, char *av[])
     for ( ; ; ) {
        (void)printf("\t> ");
        (void)fflush(stdout);
-       if (gets(buff) == NULL || buff[0] == '\n')
+       if (fgets(buff, sizeof buff, stdin) == NULL || buff[0] == '\n')
            break;
 #if YYDEBUG
        if (strcmp(buff, "yydebug") == 0) {