changeset 177:6d70bc3b54e3

merge with 1.9.2a
author Jim Meyering <jim@meyering.net>
date Thu, 23 Dec 1993 00:38:42 +0000
parents 10b9f9091b11
children 5cb13286b395
files lib/getdate.y lib/strftime.c lib/strtod.c
diffstat 3 files changed, 17 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/lib/getdate.y	Thu Dec 23 00:08:30 1993 +0000
+++ b/lib/getdate.y	Thu Dec 23 00:38:42 1993 +0000
@@ -35,20 +35,6 @@
    solely to allow compilation by non GNU-C compilers of the C parser
    produced from this file by old versions of bison.  Newer versions of
    bison include a block similar to this one in bison.simple.  */
-   
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifdef _AIX
- #pragma alloca
-#else
-void *alloca ();
-#endif
-#endif
-#endif
 
 #ifdef __GNUC__
 #undef alloca
@@ -382,25 +368,24 @@
 		yyYear = $1;
 	    else {
 		if($1>10000) {
-		    time_t date_part;
-
-		    date_part= $1/10000;
 		    yyHaveDate++;
-		    yyDay= (date_part)%100;
-		    yyMonth= (date_part/100)%100;
-		    yyYear = date_part/10000;
-		} 
-	        yyHaveTime++;
-		if ($1 < 100) {
-		    yyHour = $1;
-		    yyMinutes = 0;
+		    yyDay= ($1)%100;
+		    yyMonth= ($1/100)%100;
+		    yyYear = $1/10000;
 		}
 		else {
-		    yyHour = $1 / 100;
-		    yyMinutes = $1 % 100;
-		}
-		yySeconds = 0;
-		yyMeridian = MER24;
+		    yyHaveTime++;
+		    if ($1 < 100) {
+			yyHour = $1;
+			yyMinutes = 0;
+		    }
+		    else {
+		    	yyHour = $1 / 100;
+		    	yyMinutes = $1 % 100;
+		    }
+		    yySeconds = 0;
+		    yyMeridian = MER24;
+	        }
 	    }
 	}
 	;
--- a/lib/strftime.c	Thu Dec 23 00:08:30 1993 +0000
+++ b/lib/strftime.c	Thu Dec 23 00:38:42 1993 +0000
@@ -36,6 +36,7 @@
    Numeric modifiers (a nonstandard extension):
    -	do not pad the field
    _	pad the field with spaces
+   %s   time in seconds since 00:00:00, Jan 1, 1970
 
    Time fields:
    %H	hour (00..23)
--- a/lib/strtod.c	Thu Dec 23 00:08:30 1993 +0000
+++ b/lib/strtod.c	Thu Dec 23 00:38:42 1993 +0000
@@ -44,10 +44,10 @@
 #else
 #define NULL 0
 extern int errno;
-#endif
 #ifndef HUGE_VAL
 #define HUGE_VAL HUGE
 #endif
+#endif
 
 /* Convert NPTR to a double.  If ENDPTR is not NULL, a pointer to the
    character after the last one used in the number is put in *ENDPTR.  */