merge with 1.8.1a
authorJim Meyering <jim@meyering.net>
Mon, 4 Oct 1993 21:20:39 +0000 (21:20 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 4 Oct 1993 21:20:39 +0000 (21:20 +0000)
lib/getdate.y
lib/getopt.c
lib/getopt1.c
lib/strftime.c

index cdc2b55..ebfb7c9 100644 (file)
 /* SUPPRESS 288 on yyerrlab *//* Label unused */
 
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
+#include <config.h>
+#else
 #include "config.h"
 #endif
+#endif
 
 /* Since the code of getdate.y is not included in the Emacs executable
    itself, there is no need to #define static in this file.  Even if
@@ -115,7 +119,7 @@ static int yyerror ();
 
 #if    !defined(lint) && !defined(SABER)
 static char RCS[] =
-       "$Header: str2date.y,v 2.1 90/09/06 08:15:06 cronan Exp $";
+       "$Header: /w/src/cvsroot/shellutils/lib/getdate.y,v 1.5 1993/09/08 18:23:16 meyering Exp $";
 #endif /* !defined(lint) && !defined(SABER) */
 
 
index 49db998..7a4673b 100644 (file)
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 \f
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
 /* We use <config.h> instead of "config.h" so that a compilation
    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because getopt.c was found in $srcdir).  */
+   (which it would do because it found this file in $srcdir).  */
 #include <config.h>
+#else
+#include "config.h"
+#endif
 #endif
 
 #ifndef __STDC__
index 2b93f78..f784b57 100644 (file)
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 \f
 #ifdef HAVE_CONFIG_H
+#if defined (emacs) || defined (CONFIG_BROKETS)
 /* We use <config.h> instead of "config.h" so that a compilation
    using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because getopt1.c was found in $srcdir).  */
+   (which it would do because it found this file in $srcdir).  */
 #include <config.h>
+#else
+#include "config.h"
+#endif
 #endif
 
 #include "getopt.h"
index a075717..cfd41ad 100644 (file)
@@ -104,7 +104,13 @@ static char const * const months[] =
 /* Add character C to STRING and increment LENGTH,
    unless LENGTH would exceed MAX. */
 
-#define add_char(c) (length + 1 <= max) && (string[length++] = (c))
+#define add_char(c)                                                    \
+  do                                                                   \
+    {                                                                  \
+      if (length + 1 <= max)                                           \
+       string[length++] = (c);                                         \
+    }                                                                  \
+  while (0)
 
 /* Add a 2 digit number to STRING, padding if specified.
    Return the number of characters added, up to MAX. */