bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: [PATCH] maint: use xconcatenated_filename


From: Akim Demaille
Subject: Re: RFC: [PATCH] maint: use xconcatenated_filename
Date: Tue, 5 Jun 2012 18:04:29 +0200

Le 5 juin 2012 à 17:55, Paul Eggert a écrit :

> On 06/05/2012 08:37 AM, Akim Demaille wrote:
>> +  bool use_push_for_pull_flag = cp && *cp && STRNEQ (cp, "0");
> 
> A nit: shouldn't that 'STRNEQ (cp, "0")' be
> 'strtol (cp, 0, 10) != 0'?  That would recognize,
> e.g., "00" as zero.  No big deal either way.

:) :) :)

Actually I would not have supported "0" as being
false either, but hey, why not :)

Installed.

From 4896ede89ca060e3673e90fcd4a36f76517905c7 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Tue, 5 Jun 2012 18:02:49 +0200
Subject: [PATCH 2/2] maint: an envvar equal to "00" is 0.

* src/output.c (prepare): here.
Reported by Paul Eggert.
---
 src/output.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/output.c b/src/output.c
index 96c69da..37b15cf 100644
--- a/src/output.c
+++ b/src/output.c
@@ -668,10 +668,10 @@ output_skeleton (void)
 static void
 prepare (void)
 {
-  /* BISON_USE_PUSH_FOR_PULL is for the test suite and should not be documented
-     for the user.  */
+  /* BISON_USE_PUSH_FOR_PULL is for the test suite and should not be
+     documented for the user.  */
   char const *cp = getenv ("BISON_USE_PUSH_FOR_PULL");
-  bool use_push_for_pull_flag = cp && *cp && STRNEQ (cp, "0");
+  bool use_push_for_pull_flag = cp && *cp && strtol (cp, 0, 10);
 
   /* Flags. */
   MUSCLE_INSERT_BOOL ("defines_flag", defines_flag);
-- 
1.7.10.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]