On 07/14/2012 10:52 AM, Stefano Lattarini wrote:
> On 07/14/2012 10:32 AM, Akim Demaille wrote:
>> Well, while at it, I looked at the other failure, for C++, and
>> fixed them.
>>
>> It is installed in yacc-work.
>>
>> Akim Demaille (4):
>>   tests: upgrade and fix Bison test case
>>   ylwrap: refactoring: don't rely on the file order
>>   ylwrap: refactor: move loop invariant
>>   ylwrap: fix C++ support
>>
> ACK on the series.  And thanks!
> 
> Stefano.
>
I've pushed the two attached minor follow-ups to yacc-work.  Comments
are welcome.

Regards,
  Stefano
>From 011e69d7babe38f2baa8bc98d98dc39091502e3e Mon Sep 17 00:00:00 2001
Message-Id: <011e69d7babe38f2baa8bc98d98dc39091502e3e.1342256979.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Sat, 14 Jul 2012 11:04:42 +0200
Subject: [PATCH 1/2] ylwrap: don't uselessly reset the exit status in case of
 failure

* lib/ylwrap: Here.  In case of a failure in the wrapped yacc/lex
invocation, '$ret' (holding the final exit status of ylwrap) was
being uselessly reset to '1' in the later if/else.

Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
---
 lib/ylwrap |    2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/ylwrap b/lib/ylwrap
index 49116e5..73dba2b 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -221,8 +221,6 @@ if test $ret -eq 0; then
       fi
     fi
   done
-else
-  ret=$?
 fi
 
 # Remove the directory.
-- 
1.7.9.5

>From 13cf1151df7684bacb7d82bfb2ee3624049de408 Mon Sep 17 00:00:00 2001
Message-Id: <13cf1151df7684bacb7d82bfb2ee3624049de408.1342256979.git.stefano.lattar...@gmail.com>
In-Reply-To: <011e69d7babe38f2baa8bc98d98dc39091502e3e.1342256979.git.stefano.lattar...@gmail.com>
References: <011e69d7babe38f2baa8bc98d98dc39091502e3e.1342256979.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Sat, 14 Jul 2012 11:07:34 +0200
Subject: [PATCH 2/2] ylwrap: use proper quoting inside a `...` substitution

* lib/ylwrap ($target): Here, when redefining this to a temporary file.

Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
---
 lib/ylwrap |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ylwrap b/lib/ylwrap
index 73dba2b..7befa46 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -190,7 +190,7 @@ if test $ret -eq 0; then
       # compare them to existing versions.
       if test $from != $parser; then
         realtarget="$target"
-        target=tmp-`printf '%s\n' "$target" | sed s/.*[\\/]//g`
+        target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
       fi
 
       # Munge "#line" or "#" directives.  Don't let the resulting
-- 
1.7.9.5

Reply via email to