From 5fbc4e23846341ffb8f157c40175011d542ec33d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 23 Dec 1993 00:38:35 +0000 Subject: [PATCH] merge with 1.9.2a --- lib/getdate.y | 45 ++++++++++++++---------------------------- lib/strftime.c | 1 + lib/strtod.c | 2 +- old/sh-utils/ChangeLog | 44 +++++++++++++++++++++++++++++++++++++++++ old/sh-utils/NEWS | 3 +++ 5 files changed, 64 insertions(+), 31 deletions(-) diff --git a/lib/getdate.y b/lib/getdate.y index 09340da8b..35d064f48 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -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 -#else -#ifdef _AIX - #pragma alloca -#else -void *alloca (); -#endif -#endif -#endif #ifdef __GNUC__ #undef alloca @@ -382,25 +368,24 @@ number : tUNUMBER { 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; + } } } ; diff --git a/lib/strftime.c b/lib/strftime.c index 360c72bd3..2fe309eae 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -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) diff --git a/lib/strtod.c b/lib/strtod.c index 8723a82ef..d91584072 100644 --- a/lib/strtod.c +++ b/lib/strtod.c @@ -44,10 +44,10 @@ Cambridge, MA 02139, USA. */ #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. */ diff --git a/old/sh-utils/ChangeLog b/old/sh-utils/ChangeLog index cb148c176..9ba488784 100644 --- a/old/sh-utils/ChangeLog +++ b/old/sh-utils/ChangeLog @@ -1,3 +1,47 @@ +Wed Dec 22 00:53:51 1993 Jim Meyering (meyering@comco.com) + + * expr.c (toarith): Interpret the empty string as just that + rather than as the integer zero. + Before, `expr "" == 0' output 1. Now it prints 0. + + * configure.in (AC_HAVE_HEADERS): Check for float.h for strtod.c. + + * configure.in (check for TIOCGWINSZ): Don't look in sys/ioctl.h + or sys/ptem.h if we've already found it in termios.h. This + eliminates redefinition warnings from including both termios.h + and sys/ioctl.h on sytems running SunOS. From Matthew Seaman + (matthew@dyson.ox.ac.uk). + + * date.1: Document new %s format and old `-' and `_' numeric field + modifiers. + + * memcmp.c: Use the latest version from GNU C library. + +Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com) + + * configure.in [test for 8-bit clean memcmp]: Add a test to detect + losing memcmp from SunOS4.1.x. + +Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com) + + * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg + so it goes in config.status. This eliminates unnecessary second run + of configure. + +Fri Dec 10 01:06:28 1993 Jim Meyering (meyering@comco.com) + + * stty.c (screen_columns): Instead of dying just because Solaris' + `ioctl (0, TIOCGWINSZ' fails (strangely only for telnet sessions, + not rlogin sessions), ignore its errno == EINVAL and try to get + the number of columns another way. + + * stty.c (set_window_size): If ioctl to get window size fails, + (as on telnet sessions to Solaris 2.[12] systems) try to set the + requested fields anyway, setting to zero any unspecified fields. + This is what Sun's /bin/stty appears to do. + * (display_window_size): Don't display anything for the number + of rows and columns if the ioctl call intended to get them fails. + Tue Nov 30 23:58:54 1993 Jim Meyering (meyering@comco.com) * Version 1.9.2. diff --git a/old/sh-utils/NEWS b/old/sh-utils/NEWS index 2b3e26cc8..4f5b15bd3 100644 --- a/old/sh-utils/NEWS +++ b/old/sh-utils/NEWS @@ -1,6 +1,9 @@ User visible changes in release 1.10 * date accepts new format: %s time in seconds since 00:00:00 1/1/1971 * date -d can parse dates like `11-JUL-1991' +* expr '' == 0 works (before, it printed 1) +* stty no longer fails on telnet sessions to Solaris systems + User visible changes in release 1.9.2: * who output is better formatted on Solaris and other SysVr4 systems * fix a minor problem in formatting the output from `stty -a'