texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Mon Jul 23 09:53:01 EDT 2007)


From: Karl Berry
Subject: texinfo update (Mon Jul 23 09:53:01 EDT 2007)
Date: Mon, 23 Jul 2007 09:53:03 -0400

Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.735
retrieving revision 1.737
diff -u -r1.735 -r1.737
--- ChangeLog   23 Jul 2007 13:10:43 -0000      1.735
+++ ChangeLog   23 Jul 2007 13:26:25 -0000      1.737
@@ -1,5 +1,14 @@
 2007-07-23  Akim Demaille  <address@hidden>
 
+       * util/texi2dvi: Update DVIPSHEADERS so that dvips finds its
+       special headers.
+       Don't rely on non-IFS splitting when using local.
+       Maybe we should just not use local at all.
+       Or never use it to assign at the same time: declare, then assign.
+       * util/local.test: Check that "local" is used properly with quotes.
+
+2007-07-23  Akim Demaille  <address@hidden>
+
        Use hevea more like we use tex itself, no longer as a tool
        that does everything magically.
        * util/texi2dvi (run_hevea): Remove trailing spaces in the
Index: util/local.test
===================================================================
RCS file: /sources/texinfo/texinfo/util/local.test,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- util/local.test     1 Jul 2007 22:32:12 -0000       1.8
+++ util/local.test     23 Jul 2007 13:25:51 -0000      1.9
@@ -23,6 +23,16 @@
 
 set -e
 
+# 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
+  false
+else
+  true
+fi
+
+
+# Make sure each name is used only once.
 if sed -n 's/.*local \([a-zA-Z_0-9]*\)\(=.*\|\)$/\1/gp' $TEXI2DVI |
     sort |
     uniq -c |
Index: util/texi2dvi
===================================================================
RCS file: /sources/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.100
retrieving revision 1.102
diff -u -r1.100 -r1.102
--- util/texi2dvi       23 Jul 2007 13:10:43 -0000      1.100
+++ util/texi2dvi       23 Jul 2007 13:28:37 -0000      1.102
@@ -1,6 +1,6 @@
 #! /bin/sh
 # texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
-# $Id: texi2dvi,v 1.100 2007/07/23 13:10:43 akim Exp $
+# $Id: texi2dvi,v 1.102 2007/07/23 13:28:37 akim Exp $
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@@ -33,7 +33,7 @@
 set -e
 
 # This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 1.100 $'
+rcs_revision='$Revision: 1.102 $'
 rcs_version=`set - $rcs_revision; echo $2`
 program=`echo $0 | sed -e 's!.*/!!'`
 version="texi2dvi (GNU Texinfo 4.9) $rcs_version
@@ -195,7 +195,27 @@
 ## --------------------- ##
 
 
-# In case `local' is not supported by the shell.
+# In case `local' is not supported by the shell, provide a function
+# that simulates it by simply performing the assignments.  This means
+# that we must not expect `local' to work, i.e., we must not (i) rely
+# on it during recursion, and (ii) have two local declarations of the
+# same variable.  (ii) is easy to check statically, and our test suite
+# does make sure there is never twice a static local declaration of a
+# variable.  (i) cannot be checked easily, so just be careful.
+#
+# Note that since we might use a function simulating `local', we can
+# no longer rely on the fact that no IFS-splitting is performed.  So,
+# while
+#
+# foo=$bar
+#
+# is fine (no IFS-splitting), never write
+#
+# local foo=$bar
+#
+# but rather
+#
+# local foo="$bar"
 (
   foo=bar
   test_local () {
@@ -260,7 +280,7 @@
 # Return true if PROG is somewhere in PATH, else false.
 findprog ()
 {
-  local saveIFS=$IFS
+  local saveIFS="$IFS"
   IFS=$path_sep  # break path components at the path separator
   for dir in $PATH; do
     IFS=$saveIFS
@@ -318,7 +338,7 @@
 # Report an error and exit with failure if EXIT_STATUS is non null.
 error ()
 {
-  local s=$1
+  local s="$1"
   shift
   report "$@"
   if test "$s" != 0; then
@@ -363,7 +383,7 @@
 # preceded by SEP.
 list_prefix ()
 {
-  local lp_p=$2
+  local lp_p="$2"
   eval set X \$$1
   shift
   local lp_res
@@ -381,7 +401,7 @@
 {
   eval set X \$$1
   shift
-  local la_IFS=$IFS
+  local la_IFS="$IFS"
   IFS=$path_sep
   echo "$*"
   IFS=$la_IFS
@@ -393,7 +413,7 @@
 # Currently unused, but should replace absolute_filenames some day.
 list_dir_to_abs ()
 {
-  local ld_l=$1
+  local ld_l="$1"
   eval set X \$$ld_l
   shift
   local ld_res
@@ -445,7 +465,7 @@
 
 # Save TEXINPUTS so we can construct a new TEXINPUTS path for each file.
 # Likewise for bibtex and makeindex.
-tex_envvars="BIBINPUTS BSTINPUTS INDEXSTYLE TEXINPUTS"
+tex_envvars="BIBINPUTS BSTINPUTS DVIPSHEADERS INDEXSTYLE TEXINPUTS"
 for var in $tex_envvars; do
   eval ${var}_orig=\$$var
   export $var
@@ -753,7 +773,7 @@
   esac
 
   # Note that this will be used via an eval: quote properly.
-  local cmd=$tex
+  local cmd="$tex"
 
   # If possible, make TeX report error locations in GNU format.
   if test "${tex_help:+set}" != set; then
@@ -1184,7 +1204,7 @@
 # to handle images some day.
 run_hevea ()
 {
-  local hevea=${HEVEA:-hevea}
+  local hevea="${HEVEA:-hevea}"
   local run_hevea="$hevea"
 
   case $1 in
@@ -1293,7 +1313,7 @@
   cd_orig
   local to_remove="$t2ddir"
   $tidy || {
-    local log=$work_build/$in_noext.log
+    local log="$work_build/$in_noext.log"
     to_remove=$to_remove" $log "$(generated_files_get "$work_build/$in_noext")
   }
   remove $to_remove
P ChangeLog
P util/local.test
P util/texi2dvi




reply via email to

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