[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
white space fixes for texi2dvi
From: |
Ralf Wildenhues |
Subject: |
white space fixes for texi2dvi |
Date: |
Thu, 22 Nov 2007 22:30:03 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello bug-texinfo readers,
Here's a set of quoting fixes for texi2dvi, to make it cope with white
space in absolute file names, multiple adjacent white space even.
I found these while working to convert the Automake testsuite to allow
for white space in `pwd`. What I did not try was actual white space in
the file base names nor any passed relative names, but that is typically
under user's control.
Cheers,
Ralf
2007-11-22 Ralf Wildenhues <address@hidden>
* util/texi2dvi: Fix quoting for white space in file names.
Index: util/texi2dvi
===================================================================
RCS file: /sources/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.104
diff -u -r1.104 texi2dvi
--- util/texi2dvi 10 Sep 2007 00:36:30 -0000 1.104
+++ util/texi2dvi 22 Nov 2007 21:01:11 -0000
@@ -264,9 +264,11 @@
# Absolute paths don't need to be expanded.
echo "$1"
;;
- *) local rel="$orig_pwd/`func_dirname $1`"
+ *) local rel=$orig_pwd/`func_dirname "$1"`
if test -d "$rel"; then
- (cd "$rel" 2>/dev/null && echo `pwd`/`basename "$1"`);
+ (cd "$rel" 2>/dev/null &&
+ local n=`pwd`/`basename "$1"`
+ echo "$n")
else
error 1 "not a directory: $rel"
fi
@@ -1061,11 +1063,11 @@
$TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err
)
if test $? != 0; then
- cat $version_test_dir/txiversion.out
- cat $version_test_dir/txiversion.err >&2
+ cat "$version_test_dir/txiversion.out"
+ cat "$version_test_dir/txiversion.err" >&2
error 1 "texinfo.tex appears to be broken, quitting."
fi
- eval `sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1
txiversion="\2\3\4"/p' $version_test_dir/txiversion.out`
+ eval `sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1
txiversion="\2\3\4"/p' "$version_test_dir/txiversion.out"`
verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion'
..."
if test "$txiprereq" -le "$txiversion" >&6 2>&1; then
makeinfo=
@@ -1278,8 +1280,8 @@
# detection).
val=`absolute_filenames "$val"`
eval $var="\"$val\""
- eval export $var
- eval verbose "$var=\'\$${var}\'"
+ export $var
+ eval verbose \"$var=\'\$${var}\'\"
done
# --expand
@@ -1311,12 +1313,14 @@
mostly_clean ()
{
cd_orig
- local to_remove="$t2ddir"
+ set X "$t2ddir"
+ shift
$tidy || {
local log="$work_build/$in_noext.log"
- to_remove=$to_remove" $log "$(generated_files_get "$work_build/$in_noext")
+ set X ${1+"$@"} "$log" $(generated_files_get "$work_build/$in_noext")
+ shift
}
- remove $to_remove
+ remove ${1+"$@"}
}
@@ -1592,13 +1596,14 @@
## TeXify files. ##
## -------------- ##
-for command_line_filename in ${1+"$@"}; do
+for command_line_filename
+do
verbose "Processing $command_line_filename ..."
input_file_name_decode
# `texinfo' or `latex'?
- in_lang=`compute_language $command_line_filename`
+ in_lang=`compute_language "$command_line_filename"`
# An auxiliary directory used for all the auxiliary tasks involved
# in compiling this document.
- white space fixes for texi2dvi,
Ralf Wildenhues <=