]> diplodocus.org Git - nmh/blobdiff - sbr/dtimep.l
Makefile.am: Alter long lists to be sorted, one entry per line.
[nmh] / sbr / dtimep.l
index 4f8d8319c5fb509c28bc06513da5060515701fa0..2b6df17570c472bc0ae4d1e0d738f841e6877149 100644 (file)
@@ -35,7 +35,7 @@
    */
 #define YY_DECL struct tws *dparsetime(char *lexstr)
 
-  /* yyerminate() is called after the input string is matched to
+  /* yyterminate() is called after the input string is matched to
    * completion (actually, when the lexer reaches an EOF).  The only
    * thing that really needs to be in this macro function is the
    * return call, which must be substituted inline into dparsetime.
     tw.tw_year += 100; \
   return(&tw)
 
-/*
- * Patchable flag that says how to interpret NN/NN/NN dates. When
- * true, we do it European style: DD/MM/YY. When false, we do it
- * American style: MM/DD/YY.  Of course, these are all non-RFC822
- * compliant.
- */
-int europeandate = 0;
-
 /*
  * Table to convert month names to numeric month.  We use the
  * fact that the low order 5 bits of the sum of the 2nd & 3rd
@@ -167,7 +159,6 @@ static int day_map[] = {
 #define SKIPTOSP()   { while ( !isspace((unsigned char) *cp++) ) ; \
                        --cp; }
 
-#ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
 # ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
 # endif
@@ -187,7 +178,6 @@ zonehack (struct tws *tw)
        tw->tw_zone -= 60;
     }
 }
-#endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
 %}
 
 sun    ([Ss]un(day)?)
@@ -323,17 +313,10 @@ nl      [ \t\n()]
                                      }
 {D}("-"|"/"){D}("-"|"/"){YEAR}{W}{TIME}       {
                                      INIT();
-                                    if(europeandate) {
-                                      /* DD/MM/YY */
-                                    SETDAY();
-                                    SKIPTOD();
-                                    SETMON_NUM();
-                                    } else {
-                                      /* MM/DD/YY */
+                                    /* MM/DD/YY */
                                     SETMON_NUM();
                                     SKIPTOD();
                                     SETDAY();
-                                    }
                                     SKIPTOD();
                                     SETYEAR();
                                     SKIPTOD();
@@ -341,17 +324,10 @@ nl      [ \t\n()]
                                      }
 {D}("-"|"/"){D}("-"|"/"){YEAR}                {
                                      INIT();
-                                    if(europeandate) {
-                                      /* DD/MM/YY */
-                                    SETDAY();
-                                    SKIPTOD();
-                                    SETMON_NUM();
-                                    } else {
-                                      /* MM/DD/YY */
+                                    /* MM/DD/YY */
                                     SETMON_NUM();
                                     SKIPTOD();
                                     SETDAY();
-                                    }
                                     SKIPTOD();
                                     SETYEAR();
                                      }
@@ -363,18 +339,14 @@ nl      [ \t\n()]
                                     INIT();
                                     SKIPTOD();
                                     SETZONE(atoi(cp));
-#ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
                                    zonehack (&tw);
-#endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
                                    yyterminate();
                                     }
 "-"{D}{d}{d}                                  {
                                     INIT();
                                     SKIPTOD();
                                     SETZONE(-atoi(cp));
-#ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
                                    zonehack (&tw);
-#endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
                                    yyterminate();
                                    
                                     }