texinfo-commits
[Top][All Lists]
Advanced

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

texinfo ChangeLog util/texi2dvi


From: Karl Berry
Subject: texinfo ChangeLog util/texi2dvi
Date: Sun, 15 Mar 2009 19:00:25 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Karl Berry <karl>       09/03/15 19:00:24

Modified files:
        .              : ChangeLog 
        util           : texi2dvi 

Log message:
        allow ~ in top-level filename, undocumented -~ option to turn off the 
magic; report from Norbert

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.981&r2=1.982
http://cvs.savannah.gnu.org/viewcvs/texinfo/util/texi2dvi?cvsroot=texinfo&r1=1.137&r2=1.138

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.981
retrieving revision 1.982
diff -u -b -r1.981 -r1.982
--- ChangeLog   14 Mar 2009 17:57:41 -0000      1.981
+++ ChangeLog   15 Mar 2009 19:00:20 -0000      1.982
@@ -1,3 +1,10 @@
+2009-03-15  Karl Berry  <address@hidden>
+
+       * util/texi2dvi (run_tex): allow ~ in top-level filename.
+       in tidy mode, also make the clean dirname link if a ~ is present.
+       Continuing report from Norbert Preining, 13 Mar 2009 14:18:11,
+       Debian bug#487974.
+
 2009-03-14  Karl Berry  <address@hidden>
 
        * info/filesys.c (compress_suffixes): add .xz/unxz.

Index: util/texi2dvi
===================================================================
RCS file: /sources/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- util/texi2dvi       13 Dec 2008 14:36:52 -0000      1.137
+++ util/texi2dvi       15 Mar 2009 19:00:24 -0000      1.138
@@ -1,9 +1,9 @@
 #! /bin/sh
 # texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
-# $Id: texi2dvi,v 1.137 2008/12/13 14:36:52 karl Exp $
+# $Id: texi2dvi,v 1.138 2009/03/15 19:00:24 karl Exp $
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
+# 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Original author: Noah Friedman.
+# Originally written by Noah Friedman.
 #
 # Please send bug reports, etc. to address@hidden
 # If possible, please send a copy of the output of the script called with
@@ -33,7 +33,7 @@
 set -e
 
 # This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 1.137 $'
+rcs_revision='$Revision: 1.138 $'
 rcs_version=`set - $rcs_revision; echo $2`
 program=`echo $0 | sed -e 's!.*/!!'`
 
@@ -45,6 +45,7 @@
 # Instead, assign them an empty value.
 action=compile
 batch=false     # true for batch mode
+catcode_special=true
 debug=false
 escape="\\"
 expand=         # t for expansion via makeinfo
@@ -346,7 +347,7 @@
 
 Using the \`tidy' mode brings several advantages:
   -   the current directory is not cluttered with plethora of temporary files.
-  -   clutter can be even reduced using --build-dir=dir: all the *.t2d
+  - clutter can be even further reduced using --build-dir=dir: all the *.t2d
       directories are stored there.
   -   clutter can be reduced to zero using, e.g., --build-dir=/tmp/\$USER.t2d
       or --build-dir=\$HOME/.t2d.
@@ -368,9 +369,10 @@
 to run those commands, if they are set.  Any CMD strings are added
 after @setfilename for Texinfo input, in the first line for LaTeX input.
 
-Email bug reports to <address@hidden>,
-general questions and discussion to <address@hidden>.
-Texinfo home page: http://www.gnu.org/software/texinfo/
+Report bugs to address@hidden,
+general questions and discussion to address@hidden
+GNU Texinfo home page: <http://www.gnu.org/software/texinfo/>
+General help using GNU software: <http://www.gnu.org/gethelp/>
 EOF
   exit 0
 }
@@ -927,12 +929,27 @@
     # \batchmode does not show terminal output at all, so we don't
     # want that.  And even in batch mode, TeX insists on having input
     # from the user.  Close its stdin to make it impossible.
-    cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
+    cmd="$cmd </dev/null '${escape}nonstopmode'"
   fi
 
-  # we'd like to handle arbitrary input file names, such as a~b.tex.
-  # This isn't a general way to do it :), though it does work, kind of.
-  # cmd="$cmd '${escape}catcode126=12 \input '"
+  # we'd like to handle arbitrary input file names, especially
+  # foo~bar/a~b.tex, since Debian likes ~ characters.
+  if $catcode_special; then
+    # $normaltilde is just to reduce line length in this source file.
+    # The idea is to define \normaltilde as a catcode other ~ character,
+    # then make the active ~ be equivalent to that, instead of the plain
+    # TeX tie.  Then when the active ~ appears in the filename, it will
+    # be expanded to itself, as far as \input will see.  (This is the
+    # same thing that texinfo.tex does in general, BTW.)
+    normaltilde="${escape}catcode126=12 ${escape}def${escape}normaltilde{~}"
+    cmd="$cmd '$normaltilde${escape}catcode126=13 ${escape}let~\normaltilde '"
+  fi
+  # Other special (non-active) characters could be supported by
+  # resetting their catcodes to other on the command line and changing
+  # texinfo.tex to initialize everything to plain catcodes.  Maybe someday.
+  
+  # append the \input command.
+  cmd="$cmd '${escape}input'"
 
   # TeX's \input does not (easily or reliably) support whitespace
   # characters or other special characters in file names.  Our intensive
@@ -947,7 +964,7 @@
   # harm in making the link.
   #
   case $tidy:`func_dirname "$in_input"` in
-    true:*["$space$tab$newline\"#\$%\\^_{}"]*)
+    true:*["$space$tab$newline\"#\$%\\^_{}~"]*)
       _run_tex_file_name=`basename "$in_input"`
       if test ! -f "$_run_tex_file_name"; then
        # It might not be a file, clear it.
@@ -1214,7 +1231,7 @@
     else
       makeinfo=${MAKEINFO:-makeinfo}
     fi
-    # As long as we had to run TeX, offer the user this convenience:
+    # If TeX is preloaded, offer the user this convenience:
     if test "$txiformat" = Texinfo; then
        escape=@
     fi
@@ -1509,9 +1526,10 @@
       ;;
   esac
 
-  # This recognizes --quark as --quiet.  So what.
+  # This recognizes --quark as --quiet.  Oh well.
   case "$1" in
     -@ ) escape=@;;
+    -~ ) catcode_special=false;;
     # Silently and without documentation accept -b and --b[atch] as synonyms.
     -b | --batch) batch=true;;
         --build)      shift; build_mode=$1;;




reply via email to

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