texi2html-cvs
[Top][All Lists]
Advanced

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

[Texi2html-cvs] texi2html ChangeLog TODO texi2html.init texi2ht...


From: Patrice Dumas
Subject: [Texi2html-cvs] texi2html ChangeLog TODO texi2html.init texi2ht...
Date: Sun, 26 Apr 2009 17:35:48 +0000

CVSROOT:        /cvsroot/texi2html
Module name:    texi2html
Changes by:     Patrice Dumas <pertusus>        09/04/26 17:35:48

Modified files:
        .              : ChangeLog TODO texi2html.init texi2html.pl 
        examples       : info.init 

Log message:
                Use stdin as input if there is no file in argument and stdin
                is not a tty and fix stdin and stdout names used.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/ChangeLog?cvsroot=texi2html&r1=1.375&r2=1.376
http://cvs.savannah.gnu.org/viewcvs/texi2html/TODO?cvsroot=texi2html&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.init?cvsroot=texi2html&r1=1.188&r2=1.189
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.277&r2=1.278
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/info.init?cvsroot=texi2html&r1=1.36&r2=1.37

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texi2html/texi2html/ChangeLog,v
retrieving revision 1.375
retrieving revision 1.376
diff -u -b -r1.375 -r1.376
--- ChangeLog   26 Apr 2009 15:21:04 -0000      1.375
+++ ChangeLog   26 Apr 2009 17:35:47 -0000      1.376
@@ -12,6 +12,8 @@
        Don't close out file, to let user code close it without erroring.
        Fix output to STDOUT for info, and splitting of info output when 
        output to STDOUT, or not split.
+       Use stdin as input if there is no file in argument and stdin
+       is not a tty and fix stdin and stdout names used.
 
 2009-04-23   Patrice Dumas  <address@hidden>
 

Index: TODO
===================================================================
RCS file: /cvsroot/texi2html/texi2html/TODO,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- TODO        25 Apr 2009 14:54:41 -0000      1.90
+++ TODO        26 Apr 2009 17:35:47 -0000      1.91
@@ -75,8 +75,8 @@
 @end table
 }
 
-* test @printindex in diverse contexts
-  and handle right things like
+* test @printindex in diverse contexts and handle right, or complain about
+  things like
 @code{
 @printindex cp
 }
@@ -86,11 +86,9 @@
 writer to add a line. There is a Config hash now for @style_map commands.
 formats automatically stop paragraphs.
 
-* honor stop_paragraph_command for misc_commands?
-
 * @macro definition in @ifset is parsed but ignored. So in the following, the
address@hidden ifset appearing in the macro is ignored, and the macro isn't 
defined.
-Don't know if it's right.
address@hidden ifset appearing in the macro is ignored if 'a' is not set, and 
the 
+macro isn't defined.
 
 @ifset a
 @macro bidule
@@ -142,18 +140,19 @@
   menu_comment in makeinfo --xml treated as normal text.
   the documentation, however uses the same words than in texi2html.
 
-* Tests/formatting/code_not_closed.texi should trigger 2 errors, none
+* tests/invalid/code_not_closed.texi should trigger 2 errors, none
   are triggered currently.
 
-* a FIXME in Tests/formatting/detailmenus.texi with a warning missing 
+* a FIXME in test/formatting/detailmenus.texi with a warning missing 
   for a menu entry for a spurious entry with no corresponding node entry.
   more precisely the node is not among the direct subsections.
 
-* roff is certainly not uptodate. At least the @quote* and @guillem*
+* roff is not uptodate. At least the @quote* and @guillem* and many 
+  others.
 
 * the code of xml.c in makeinfo shows specific treatement of & in 
-  definition arguments. I don't know what it corresponds with. All
-  the definition argument parsing stuff is certainly worth asking
+  definition arguments. I don't know what it corresponds with. The
+  formal definition argument parsing stuff is certainly worth asking
   on the texinfo list.
 
 * something like
@@ -165,34 +164,6 @@
 
 * formatting/nodename_parentheses.texi gives wrong output.
 
-* in @example, makeinfo --xml 
-
-@ followed by a space
-&space;@ followed by a tab
-&space;@ followed 
-
-texi2html
-@ followed by a space
-&space;
-@ followed by a tab
-&space;
-@ followed 
-
-* in xml 
address@hidden
address@hidden i--temize
address@hidden itemize
-
-makeinfo:
-<itemize><itemfunction>&bullet;</itemfunction><item>
-i--temize
-</item>
-        </itemize>
-texi2html:
-<itemize><itemfunction>&bullet;</itemfunction><item> i--temize
-</item>
-</itemize>
-
 * in xml
 @itemize @bullet{} a--n itemize line
 @item i--tem 1
@@ -214,21 +185,6 @@
 </item>
 </itemize>
 
-* in xml
address@hidden
address@hidden e--numerate
address@hidden enumerate
-
-makeinfo:
-<enumerate first="1"><item>
-e--numerate
-</item>
-        </enumerate>
-texi2html:
-<enumerate first="1"><item> e--numerate
-</item>
-</enumerate>
-
 * add @detailmenu in coverage, and @group
 
 * in imbrications.texi there should be a warning for
@@ -289,11 +245,7 @@
 
 * decide @documentencoding @. And maybe change regexp.
 
-* html32 is not up to date: 
-Error at line 2159, character 8:  unknown entity "euro"
-Error at line 2161, character 7:  unknown entity "le"
-Error at line 2162, character 7:  unknown entity "ge"
-
+* html32 
 For headings. In normal it is strong.
 Error at line 2616, character 4:  element "H1" not allowed here; check
         which elements this element may be contained within
@@ -391,9 +343,6 @@
 
 * add 0x7F as a comment character (ignore to eol).
 
-* add as a filter when things come from STDIN, and there is no file in 
-  argument. If there is no setfilename, file name is stdin.info.
-
 * texi2html doesn't understand `-o /dev/null'.  It aborts with
       *** /dev/ not writable
   report from Werner LEMBERG.

Index: texi2html.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.init,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -b -r1.188 -r1.189
--- texi2html.init      26 Apr 2009 15:21:07 -0000      1.188
+++ texi2html.init      26 Apr 2009 17:35:47 -0000      1.189
@@ -12,7 +12,7 @@
 # Afterwards, load the file with command-line 
 # option -init-file <your_init_file>
 #
-# $Id: texi2html.init,v 1.188 2009/04/26 15:21:07 pertusus Exp $
+# $Id: texi2html.init,v 1.189 2009/04/26 17:35:47 pertusus Exp $
 
 ######################################################################
 # The following variables can also be set by command-line options
@@ -406,6 +406,12 @@
 # file name used for Top node when NODE_FILES is true
 $TOP_NODE_FILE = 'index';
 
+# file used as document basename, when input file is -
+$STDIN_DOCU_NAME = 'stdin';
+
+# file used as document output basename, when output file is -
+$STDOUT_DOCU_NAME = 'stdout';
+
 # node name used for Top node when automatic node directions are used
 $TOP_NODE_UP = '(dir)';
 

Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -b -r1.277 -r1.278
--- texi2html.pl        26 Apr 2009 15:21:12 -0000      1.277
+++ texi2html.pl        26 Apr 2009 17:35:48 -0000      1.278
@@ -79,7 +79,7 @@
 }
 
 # CVS version:
-# $Id: texi2html.pl,v 1.277 2009/04/26 15:21:12 pertusus Exp $
+# $Id: texi2html.pl,v 1.278 2009/04/26 17:35:48 pertusus Exp $
 
 # Homepage:
 my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";;
@@ -318,6 +318,8 @@
 $TOP_NODE_FILE
 $TOP_NODE_UP
 $NODE_FILE_EXTENSION
+$STDIN_DOCU_NAME
+$STDOUT_DOCU_NAME
 $BEFORE_OVERVIEW
 $AFTER_OVERVIEW
 $BEFORE_TOC_LINES
@@ -3557,8 +3559,14 @@
    unshift(@Texi2HTML::Config::INCLUDE_DIRS, $docu_dir);
    unshift(@Texi2HTML::Config::INCLUDE_DIRS, @Texi2HTML::Config::PREPEND_DIRS);
 # AAAA
-   $docu_name = $Texi2HTML::Config::PREFIX if ($Texi2HTML::Config::PREFIX
-       and ($file_nr == 0));
+   if ($Texi2HTML::Config::PREFIX and ($file_nr == 0))
+   {
+      $docu_name = $Texi2HTML::Config::PREFIX;
+   }
+   elsif ($docu_name eq '-')
+   {
+      $docu_name = $Texi2HTML::Config::STDIN_DOCU_NAME;
+   }
 
 # subdir
    $docu_rdir = '';
@@ -14435,13 +14443,16 @@
 #
 #######################################################################
 
-die "$0: missing file argument.\n$T2H_FAILURE_TEXT" unless (scalar(@ARGV) >= 
1);
+my @input_files = @ARGV;
+# use STDIN if not a tty, like makeinfo does
address@hidden = ('-') if (!scalar(@input_files) and !-t STDIN);
+die "$0: missing file argument.\n$T2H_FAILURE_TEXT" unless 
(scalar(@input_files) >= 1);
 
 my $file_number = 0;
 # main processing
-while(@ARGV)
+while(@input_files)
 {
-   my $input_file_name = shift(@ARGV);
+   my $input_file_name = shift(@input_files);
 
    %Texi2HTML::THISDOC = ();
    $Texi2HTML::THIS_ELEMENT = undef;

Index: examples/info.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/info.init,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- examples/info.init  26 Apr 2009 15:21:15 -0000      1.36
+++ examples/info.init  26 Apr 2009 17:35:48 -0000      1.37
@@ -1685,6 +1685,7 @@
     # directly, but then tests are not reproducible in out of source builds
     my $basename = $Texi2HTML::THISDOC{'input_file_name'};
     $basename =~ s/^.*\/// if ($TEST);
+    $basename = $STDIN_DOCU_NAME if ($basename eq '-');
     my $result = "This is $Texi2HTML::THISDOC{'filename'}->{'top'}, produced 
by makeinfo version 4.13 from $basename. ";
     my $dummy;
     ($dummy, $dummy, $dummy, $dummy, $result) = 
info_default_process_text($result, 0, '', undef, undef, 1, 
$info_default_max_column);
@@ -1803,7 +1804,9 @@
 {
     my $element = shift;
     my $info_state = shift;
-    my $result = "\x{1F}\nFile: $Texi2HTML::THISDOC{'filename'}->{'top'},  
Node: $element->{'text'}";
+    my $outfile = $Texi2HTML::THISDOC{'filename'}->{'top'};
+    $outfile = $STDOUT_DOCU_NAME if ($outfile eq '-');
+    my $result = "\x{1F}\nFile: $outfile,  Node: $element->{'text'}";
     if (defined($element->{'NodeNext'}))
     {
        $result .= ','.&$I('  Next: %{node_next}', {'node_next' => 
$element->{'NodeNext'}->{'text'}});
@@ -2995,11 +2998,17 @@
     my $type = shift;
     my $prefix = shift;
 
-    if ($type eq 'doc' and defined($Texi2HTML::THISDOC{'setfilename'}) and not 
defined($OUT))
+    my $outname;
+    $outname = $OUT if (defined($OUT) and 
$Texi2HTML::THISDOC{'input_file_number'} == 0);
+    if ($type eq 'doc') 
+    {
+       if (defined($Texi2HTML::THISDOC{'setfilename'}) and !defined($outname))
     {
        $Texi2HTML::THISDOC{'extension'} = '';
        return $Texi2HTML::THISDOC{'setfilename'};
     }
+    }
+
     return undef;
 }
 




reply via email to

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