]> diplodocus.org Git - nmh/blobdiff - sbr/dtimep.l
Use C's `++', `+=', etc., not the longhand.
[nmh] / sbr / dtimep.l
index a4f8d8be3096ddb64ff0a3ca5faca164e9aba55a..d2483769a814ed921daeb342407bf95dba5d2d2e 100644 (file)
@@ -1,4 +1,6 @@
-/* dtimep.l exceeds the default table capacities for some old versions
+/* dtimep.l -- parse dates and times.
+ *
+ * This exceeds the default table capacities for some old versions
  * of lex (and the minimum defaults as specified by POSIX).  The following
  * choices meet or exceed the lex defaults for older SunOS4.x, Solaris,
  * HPUX, and AIX.
     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
@@ -321,17 +315,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();
@@ -339,17 +326,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();
                                      }