[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: char-ranges.patch
From: |
Pavel Roskin |
Subject: |
Re: char-ranges.patch |
Date: |
Mon, 23 Oct 2000 14:55:13 -0700 (PDT) |
Hello, Akim!
> Index: ChangeLog
> from Akim Demaille <address@hidden>
> Start avoiding dependence upon character ranges.
>
> * acgeneral.m4 (_AC_INIT_DEFAULTS): Introduce `ac_cr_AZ',
> `ac_cr_az', `ac_cr_09', `ac_cr_alnum' and `ac_hostname'.
> Spread their use.
ac_cr_09 sounds weird. ac_cr_num would be better.
ac_hostname could belong to a separate patch.
> +++ acgeneral.m4 2000/10/23 19:46:55
> @@ -1270,13 +1270,26 @@
> subdirs=
> MFLAGS= MAKEFLAGS=
> AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
> +
> # Maximum number of lines to put in a shell here document.
Akim, you should be allowed to add newlines without asking in the list :-)
> # This variable seems obsolete. It should probably be removed, and
> # only ac_max_sed_lines should be used.
> : ${ac_max_here_lines=38}
> +
> +# Name of the host.
> +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
> +# so uname gets run too. Use two double quotes for font-lock.
> +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
Double quotes??? Font-lock???
This part of the comment should probably be left where it stood.
> +# Avoid depending upon Character Ranges.
Why capitalized?
# Don't use character ranges - they don't work on EBCDIC systems.
> # Sed expression to map a string onto a valid sh and CPP variable names.
> -ac_tr_sh='sed y%*+%pp%;s%[[^a-zA-Z0-9_]]%_%g'
> -ac_tr_cpp='sed
> y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[[^A-Z0-9_]]%_%g'
> +ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
> +ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
You replaces single quotes with double quotes. Maybe it's safe, but I would
feel safer if single quotes were used everywhere except variables:
ac_tr_sh='sed y%*+%pp%;s%[[^_'$ac_cr_alnum']]%_%g'
> - # `set' does not quote correctly, so add quotes (double-quote
> substitution
> - # turns \\\\ into \\, and sed turns \\ into \).
> + # `set' does not quote correctly, so add quotes (double-quote
> + # substitution turns \\\\ into \\, and sed turns \\ into \).
That's great but please do it separately.
> # `set' quotes correctly as required by POSIX, so do not add quotes.
> - sed -n '[s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p]'
> + sed -n \
> + ["s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
Again single quoting vs. double quoting.
> -pushdef(AC_Prog, translit($1, a-z, A-Z))dnl
> +pushdef([AC_Prog], translit([$1], [a-z], [A-Z]))dnl
It's a separate issue again. It's fine with me if you apply such changes without
asking anybody.
> -AC_PATH_PROG(AC_Prog, $1)
> +AC_PATH_PROG(AC_Prog, [$1])
Why not [AC_Prog] in this case? What has all this to do with character ranges?
> -dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
> -dnl so uname gets run too. Use two double quotes for font-lock.
> cat >>$CONFIG_STATUS <<EOF
> ac_cs_version="\\
Here come those double quotes. Maybe.
> $CONFIG_STATUS generated by autoconf version AC_ACVERSION.
> -Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
> +Configured on host $ac_hostname by
Everything else is Ok.
Regards,
Pavel Roskin
- char-ranges.patch, Akim Demaille, 2000/10/23
- Re: char-ranges.patch,
Pavel Roskin <=
- Re: char-ranges.patch, Lars J. Aas, 2000/10/24
- Re: char-ranges.patch, Akim Demaille, 2000/10/24
- Re: char-ranges.patch, Lars J. Aas, 2000/10/24
- Re: char-ranges.patch, Akim Demaille, 2000/10/24
- Re: char-ranges.patch, Lars J. Aas, 2000/10/24
- Re: char-ranges.patch, Akim Demaille, 2000/10/24
- Re: char-ranges.patch, Alexandre Oliva, 2000/10/24