autoconf
[Top][All Lists]
Advanced

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

Re: Issue with AS_TR_CPP, m4_cr_all and EBCDIC codeset


From: Ralf Wildenhues
Subject: Re: Issue with AS_TR_CPP, m4_cr_all and EBCDIC codeset
Date: Wed, 7 Apr 2010 07:02:04 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hello,

* Eric Blake wrote on Sat, Apr 03, 2010 at 01:32:45AM CEST:
> +     Fix m4_cr_all for EBCDIC.
> +     * lib/m4sugar/m4sugar.m4 (m4_cr_all): Swap * and $, so that we
> +     don't end up with $* in EBCDIC.
> +     Reported by Steve Goetze.

thanks for working on this!

> --- i/lib/m4sugar/m4sugar.m4
> +++ w/lib/m4sugar/m4sugar.m4
> @@ -2192,13 +2192,16 @@ m4_defn([m4_cr_digits])dnl
>  # characters via m4_translit must deal with the fact that m4_translit does
>  # not add quotes to the output.
>  #
> +# In EBCDIC, $ is immediately followed by *, which leads to problems
> +# if m4_cr_all is inlined into a macro definition; so swap them.
> +#
>  # It is mainly useful in generating inverted character range maps, for use
>  # in places where m4_translit is faster than an equivalent m4_bpatsubst;
>  # the regex `[^a-z]' is equivalent to:
>  #  m4_translit(m4_dquote(m4_defn([m4_cr_all])), [a-z])
>  m4_define([m4_cr_all],
>  m4_translit(m4_dquote(m4_format(m4_dquote(m4_for(
> -  ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [-])-)
> +  ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [$*-], [*$])-)

Reading the patch, I wonder why the $* in the second argument to
m4_translit does not ever get expanded to something undesirable?

Thanks,
Ralf




reply via email to

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