bug-texinfo
[Top][All Lists]
Advanced

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

FYI: Changes in texi2dvi


From: Akim Demaille
Subject: FYI: Changes in texi2dvi
Date: Thu, 28 Feb 2008 15:03:19 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * util/texi2dvi: Don't use "local foo=`cmd`", because in that case
        failures of cmd, including with set -e, will go unnoticed.  So
        always first declare with local, then run the assignment.
        (index_file_p): Adjust to be usable with index.sty.
        * util/local.test: Make the test more robust.
 
Index: util/local.test
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/local.test,v
retrieving revision 1.10
diff -u -u -r1.10 local.test
--- util/local.test 25 Jul 2007 12:18:41 -0000 1.10
+++ util/local.test 28 Feb 2008 14:01:43 -0000
@@ -25,7 +25,11 @@
 
 # Make sure quotes are used to protect the value.  See the comment in
 # texi2dvi itself about local.
-if $EGREP "^ *local [a-zA-Z_0-9]*=[^\"']" $TEXI2DVI; then
+if sed -e 's/^[         ]*#.*//' $TEXI2DVI |
+    $EGREP "\blocal [a-zA-Z_0-9]*=[^\"']" |
+    $EGREP -v "\blocal [a-zA-Z_0-9]*=[a-zA-Z0-9]*$" |
+    grep .
+then
   false
 else
   true
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.113
diff -u -u -r1.113 texi2dvi
--- util/texi2dvi 26 Feb 2008 17:09:39 -0000 1.113
+++ util/texi2dvi 28 Feb 2008 14:01:43 -0000
@@ -488,7 +488,8 @@
   local replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \
                       -e 's/$path_sep\$/${path_sep}EMPTY/g' \
                       -e 's/$path_sep$path_sep/${path_sep}EMPTY:/g'"
-  local res=`echo "$1" | eval sed $replace_empty`
+  local res
+  res=`echo "$1" | eval sed $replace_empty`
   save_IFS=$IFS
   IFS=$path_sep
   set x $res; shift
@@ -517,8 +518,10 @@
 {
   case $oname in
     '') echo "$1";;
-     *) local out_noext=`echo "$oname" | sed 's/\.[^.]*$//'`
-       local file_ext=`echo "$1" | sed 's/^.*\.//'`
+     *) local out_noext
+       out_noext=`echo "$oname" | sed 's/\.[^.]*$//'`
+       local file_ext
+       file_ext=`echo "$1" | sed 's/^.*\.//'`
        echo "$out_noext.$file_ext"
       ;;
   esac
@@ -625,11 +628,12 @@
 # index_file_p FILE
 # -----------------
 # Return with success with FILE is an index file.
+# When index.sty is used, there is a space before the brace.
 index_file_p ()
 {
   test -f "$1" || return 1
   case `sed '1q' $1` in
-    "\\entry{"*|"\\indexentry{"*) return 0;;
+    "\\entry{"*|"\\indexentry{"*|"\\indexentry {"*) return 0;;
     *) return 1;;
   esac
 }
@@ -1110,7 +1114,8 @@
     work_src=$workdir/src
     ensure_dir "$work_src"
     in_src=$work_src/$in_base
-    local miincludes=`list_prefix includes -I`
+    local miincludes
+    miincludes=`list_prefix includes -I`
     verbose "Macro-expanding $command_line_filename to $in_src ..."
     # eval $makeinfo because it might be defined as something complex
     # (running missing) and then we end up with things like '"-I"',




reply via email to

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