bug-texinfo
[Top][All Lists]
Advanced

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

texi2dvi 4.13 makes invalid use of egrep


From: Bruno Haible
Subject: texi2dvi 4.13 makes invalid use of egrep
Date: Sat, 28 May 2011 16:29:20 +0200
User-agent: KMail/1.9.9

Hi,

When running "make dvi" in the gnulib/doc directory, I get this message in the
output:

...
texi2dvi gnulib.texi || { if texi2dvi gnulib.texi 2>/dev/null | grep 'TeX 
capacity exceeded, sorry \[save size=' > /dev/null; then echo '*** You must 
increase the save_size in your texmf.cnf file, often located under 
/etc/texmf/.'; fi; exit 1; }
egrep: Das Ende des angegebenen Intervalls ist nicht gültig
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
...

Note the error message from egrep. It means "The specified end of the interval
is not valid."

Implied software versions:

$ texi2dvi --version
texi2dvi (GNU Texinfo 4.13) 1.135

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ egrep --version
egrep (GNU grep) 2.7
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others, see 
<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.

$ /lib/libc.so.6 --version
GNU C Library stable release version 2.8 (20080425), by Roland McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Configured for i586-suse-linux.
Compiled by GNU CC version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 
135036].
Compiled on a Linux 2.6.25 system on 2008-12-17.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        NoVersion patch for broken glibc 2.0 binaries
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


Apparently, the use of ranges like [A-z] in locales other than the C locale is
not portable. And ranges like [A-Za-z], like introduced on 2010-03-31

  revision 1.158
  date: 2010-03-31 01:13:37 +0200;  author: karl;  state: Exp;  lines: +3 -3;  
commitid: hdIVEkKR55Fqg1tu;
  [A-Za-z] since [A-z] gets invalid range end on utf-8

is not much better either: A-Z does not cover all of ABCDEFGHIJKLMNOPQRSTUVWXYZ 
in
Estonian and Turkmen locales:

  $ for l in `locale -a`; do if echo ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=$l 
grep '[^A-Z]' > /dev/null ; then echo $l; fi; done
  et_EE
  et_EE.iso885915
  et_EE.utf8
  tk_TM
  /packages/gnu/bin/grep-2.7: unbalanced [


Here's a fix:


2011-05-28  Bruno Haible  <address@hidden>

        texi2dvi: Enforce C locale when passing range expression to egrep.
        * util/texi2dvi: Set LC_ALL to C for egrep of range expression.

diff -u -r1.162 texi2dvi
--- util/texi2dvi       23 May 2011 21:53:11 -0000      1.162
+++ util/texi2dvi       28 May 2011 14:06:04 -0000
@@ -1857,7 +1857,7 @@
 
   # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
   # prepend `./' in order to avoid that the tools take it as an option.
-  echo "$command_line_filename" | $EGREP '^(/|[A-Za-z]:/)' >&6 \
+  echo "$command_line_filename" | LC_ALL=C $EGREP '^(/|[A-Za-z]:/)' >&6 \
   || command_line_filename="./$command_line_filename"
 
   # See if the file exists.  If it doesn't we're in trouble since, even

-- 
In memoriam Thomas Ford 
<http://en.wikipedia.org/wiki/Thomas_Ford_(Catholic_martyr)>



reply via email to

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