Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: * Re: Failed tests of zsh 4.3.5 in Solaris 10 w/Sun Studio 12 CC



Hi,

On Tue, Feb 26, 2008 at 8:08 PM, Peter Stephenson <pws@xxxxxxx> wrote:
> On Tue, 26 Feb 2008 16:10:58 +0000
>  Peter Stephenson <pws@xxxxxxx> wrote:
>  > +                 if (!codessetstr || !*codsetstr ||
>  > +                     !strcmp(codesetstr, "646"))
>  > +                     codesetstr == "US-ASCII";
>
>  Er, except that there are three mistakes in those three lines of code, as
>  Geoff pointed out.  I was lulled into a false sense of security because
>  this doesn't get compiled on my machine.  I tried it specially.
>
>  Index: Src/utils.c
>  ===================================================================
>  RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
>  retrieving revision 1.178
>  diff -u -r1.178 utils.c
>  --- Src/utils.c 26 Feb 2008 16:19:34 -0000      1.178
>  +++ Src/utils.c 26 Feb 2008 18:05:59 -0000
>  @@ -4885,9 +4885,9 @@
>                      * It shouldn't ever be NULL, but while we're
>                      * being paranoid...
>                      */
>  -                   if (!codessetstr || !*codsetstr ||
>  +                   if (!codesetstr || !*codesetstr ||
>                         !strcmp(codesetstr, "646"))
>  -                       codesetstr == "US-ASCII";
>  +                       codesetstr = "US-ASCII";
>                     cd = iconv_open(nl_langinfo(CODESET), "UCS-4BE");
>                     if (cd == (iconv_t)-1) {
>                         zerr("cannot do charset conversion (iconv failed)");

Yeah my patch did the same. Thanks.

-- 
Never learn by your mistakes, if you do you may never dare to try again



Messages sorted by: Reverse Date, Date, Thread, Author