libtool-patches
[Top][All Lists]
Advanced

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

FYI: beef up sed_double_backslash [libtool--release--2.0--patch-34]


From: Gary V. Vaughan
Subject: FYI: beef up sed_double_backslash [libtool--release--2.0--patch-34]
Date: Thu, 21 Oct 2004 17:50:48 +0100 (BST)
User-agent: mailnotify/0.5

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

Applied to branch-2-0 and HEAD.

  * looking for address@hidden/libtool--release--2.0--patch-33 to compare with
  * comparing to address@hidden/libtool--release--2.0--patch-33
  M  ChangeLog
  M  config/general.m4sh
  
  * modified files
  
  Index: Changelog
  from  Noah Misch  <address@hidden>,
        Gary V. Vaughan  <address@hidden>
  
        * config/general.m4sh (sed_double_backslash): Improve this sed
        expression to correct left anchored \$ input to
        double_quote_subst, as well as backslash escaped $ preceded by
        any odd-numbered amount of \ characters.
  
  --- orig/config/general.m4sh
  +++ mod/config/general.m4sh
  @@ -94,12 +94,14 @@
   # Same as above, but do not quote variable references.
   double_quote_subst='s/\([["`\\]]\)/\\\1/g'
   
  -# Save mangling of backslash escaped dollars by the above.  Running this
  -# substitution after double_quote_subst notices and corrects expansion
  -# of already escaped meta-chars.  \$x -> double_quote_subst -> \\$x,
  -# which doesn't protect $x from expansion.  To correct this we do:
  -# \\$x -> sed_double_backslash -> \\\$x, properly protecting $x.
  -sed_double_backslash='s/\([[^\\]]\)\\\\$/\1\\\\\\$/g'
  +# Re-`\' parameter expansions in output of double_quote_subst that were
  +# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
  +# in input to double_quote_subst, that '$' was protected from expansion.
  +# Since each input `\' is now two `\'s, look for any number of runs of
  +# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.  Note
  +# that the embedded single quotes serve only to enhance readability.
  +sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\$\)/\\\1/;
  +                s/\([[^\\]]\(''\\\\''\\\\''\)*''\\\\''\$\)/\\\1/g'
   
   # test EBCDIC or ASCII
   case `$ECHO A|tr A '\301'` in
  
  
  
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.8
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBd+jnFRMICSmD1gYRAlt8AKCuqR/KuKU5pDeT0HE5f91Xe9YbVACgu9J6
NktD1yy0trLh80wyfY84+24=
=pgG3
-----END PGP SIGNATURE-----




reply via email to

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