bug-autoconf
[Top][All Lists]
Advanced

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

Re: _AS_ECHO_N_PREPARE - bug correction in ksh88 on AIX 6.1


From: Eric Blake
Subject: Re: _AS_ECHO_N_PREPARE - bug correction in ksh88 on AIX 6.1
Date: Tue, 30 Jun 2009 05:56:15 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 6/30/2009 12:07 AM:
> Thinking about it again, my patch was too lax and should have been
> stricter: within a command substitution, the \c causes all but the
> first character of the output to be removed.  Let's test for that,
> just like Jan suggested, but just not set ECHO_C at all in this
> case, and set ECHO_T to a tab like is done in the other bailout
> case.
> 
> Thus I suggest this patch.  OK?

Yes, once these nits are fixed:

> address@hidden  Within a command substitution, @samp{echo 'string\c'} will
> +mess up the internal state of ksh88 on AIX 6.1 so that it will print
> +the first character @samp{c} only, followed by a newline, and then

s/{c}/{s}/

> +entirely drop the output of the next echo in a command substitution.

Would it be worth an @example showing this weird behavior, or do you think
the paragraph was sufficient?  I could go either way.

>  [ECHO_C= ECHO_N= ECHO_T=
>  case `echo -n x` in @%:@((((

You added a ), so this comment should add a (.

>  -n*)
> -  case `echo 'x\c'` in
> +  case `echo 'xy\c'` in
>    *c*) ECHO_T='      ';;     # ECHO_T is single tab character.
> -  *)   ECHO_C='\c';;
> +  xy*) ECHO_C='\c';;

I'd rather use exactly 'xy)', since the whole point of \c was that no
other characters appeared.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpJ/V8ACgkQ84KuGfSFAYCRpACgvbtu9fzuSvjsVX1LKJzz5NFm
xocAnj7WJz+L5aX3yi6OgSbHYQ352V/D
=0CoO
-----END PGP SIGNATURE-----




reply via email to

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