changeset 101:40a78c8d27fd

merge with 1.8.1a
author Jim Meyering <jim@meyering.net>
date Mon, 04 Oct 1993 21:20:39 +0000
parents 4d645beabfa4
children 9007b78daafc
files lib/getdate.y lib/getopt.c lib/getopt1.c lib/strftime.c
diffstat 4 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -14,8 +14,12 @@
 /* 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 @@
 
 #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) */
 
 
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -21,10 +21,14 @@
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #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__
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -17,10 +17,14 @@
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #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"
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -104,7 +104,13 @@
 /* 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. */