changeset 111:361372d725f6

GNU shell utilities
author Jim Meyering <jim@meyering.net>
date Mon, 04 Oct 1993 21:07:56 +0000
parents 5177290a8425
children f36d12551bb4
files lib/getdate.y lib/strftime.c
diffstat 2 files changed, 11 insertions(+), 1 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
--- 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. */