[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: pointless code removal
From: |
Bruce Korb |
Subject: |
Re: PATCH: pointless code removal |
Date: |
Wed, 06 Mar 2002 23:01:51 -0800 |
Bruce Korb wrote:
>
> Hi Alexandre,
How's this?
It fixes a bug, too. From the original:
> for arg
> do
> case $prev in
> "") ;;
> xcompiler)
> # Aesthetically quote the previous argument.
> prev=
> lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
>
> case $arg in
> # Double-quote args containing other shell metacharacters.
> # Many Bourne shells cannot handle close brackets correctly
> # in scan sets, so we specify it separately.
> *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
> arg="\"$arg\""
Methinks "arg" should read "lastarg".
Or else, don't mess with "lastarg" and just use "arg"
throughout this clause.
> ;;
> esac
>
> # Add the previous argument to base_compile.
> if test -z "$base_compile"; then
> base_compile="$lastarg"
> else
> base_compile="$base_compile $lastarg"
> fi
> continue
> ;;
Anyway, attached is a rewrite of the whole section in a
way that I can understand. It seems to do the same thing
for me....(except that it is also capable of putting double
quotes around the argument pointed out above and it leaves
a spurious space character at the start of the base_compile
string...)
Bruce Korb
AG URL: http://autogen.sourceforge.net
ltcompile.sh
Description: Bourne shell script