texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp texi2any.pl Texinfo/Common.pm Texinf...


From: Patrice Dumas
Subject: texinfo/tp texi2any.pl Texinfo/Common.pm Texinf...
Date: Sun, 20 Mar 2011 20:47:49 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/03/20 20:47:49

Modified files:
        tp             : texi2any.pl 
        tp/Texinfo     : Common.pm Parser.pm Structuring.pm 
        tp/Texinfo/Convert: Info.pm Plaintext.pm 

Log message:
        Remove illicit characters in comments.
        No interpolation in gettext strings.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.226&r2=1.227
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.123&r2=1.124

Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- texi2any.pl 20 Mar 2011 20:29:00 -0000      1.25
+++ texi2any.pl 20 Mar 2011 20:47:48 -0000      1.26
@@ -27,7 +27,7 @@
 
 # to determine the path separator and null file
 use Config;
-# for dirname.
+# for dirname.
 use File::Basename;
 #use Cwd;
 use Getopt::Long qw(GetOptions);
@@ -85,7 +85,7 @@
 my $messages_textdomain = '@PACKAGE@';
 $messages_textdomain = 'texinfo' if ($messages_textdomain eq '@'.'PACKAGE@');
 my $strings_textdomain = '@PACKAGE@' . '_document';
-# FIXME use texinfo
+# FIXME use texinfo
 $strings_textdomain = 'texi2html_document' if ($strings_textdomain eq 
'@'.'PACKAGE@' . '_document');
 
 sub __($) {
@@ -99,9 +99,9 @@
   return Locale::Messages::dpgettext($messages_textdomain, $context, $msgid);
 }
 
-# FIXME use something else than srcdir?
+# FIXME use something else than srcdir?
 my $srcdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : dirname $0;
-# FIXME
+# FIXME
 $srcdir = "$srcdir/../texi2html";
 if ($0 =~ /\.pl$/) {
   unshift @INC, "$srcdir/lib/libintl-perl/lib";
@@ -153,13 +153,13 @@
 }
 require Unicode::EastAsianWidth;
 
-# This is done at runtime because the modules above are also found at runtime.
+# This is done at runtime because the modules above are also found at runtime.
 require Texinfo::Parser;
 require Texinfo::Structuring;
 require Texinfo::Convert::Info;
 require DebugTexinfo::DebugCount;
 
-# determine configuration directories.
+# determine configuration directories.
 
 my $conf_file_name = 'Config' ;
 my $texinfo_htmlxref = 'htmlxref.cnf';
@@ -186,7 +186,7 @@
   push @program_init_dirs, "${texinfo_config_dir}/init";
 }
 
-# Namespace for configuration
+# Namespace for configuration
 {
 package Texinfo::Config;
 
@@ -251,9 +251,9 @@
   $valid_options{$var} = 1;
 }
 
-# passed from main program
+# passed from main program
 my $cmdline_options;
-# used in main program
+# used in main program
 our $options = {};
 
 sub _load_config ($) {
@@ -294,7 +294,7 @@
   return 1;
 }
 
-# FIXME also get @-command results?
+# FIXME also get @-command results?
 sub get_conf($) {
   my $var = shift;
   if (exists($cmdline_options->{$var})) {
@@ -307,7 +307,7 @@
 }
 
 }
-# back in main program namespace
+# back in main program namespace
 
 # file:        file name to locate. It can be a file path.
 # directories: a reference on a array containing a list of directories to
@@ -358,9 +358,9 @@
 my @texi2dvi_args = ();
 
 my $format = 'info';
-# this is the format associated with the output format, which is replaced
-# when the output format changes.  It may also be removed if there is the
-# corresponding --no-ifformat.
+# this is the format associated with the output format, which is replaced
+# when the output format changes.  It may also be removed if there is the
+# corresponding --no-ifformat.
 my $default_expanded_format = [ $format ];
 my @conf_dirs = ();
 my @include_dirs = ();
@@ -369,12 +369,12 @@
 my @css_refs = ();
 
 # defaults for options relevant in the main program, and not undef. 
-# Others are set in the converters.
-# Other relevant options (undef) are NO_WARN FORCE OUTFILE
+# Others are set in the converters.
+# Other relevant options (undef) are NO_WARN FORCE OUTFILE
 
 my $converter_default_options = {'ERROR_LIMIT' => 100};
 
-# options for all the files
+# options for all the files
 my $parser_default_options = {'expanded_formats' => [], 'values' => {},
                               'gettext' => \&__};
 
@@ -460,7 +460,7 @@
       $parser_default_options->{'novalidate'} = $_[1];
     },
  'no-warn' => sub { set_from_cmdline('NO_WARN', $_[1]); },
- # FIXME pass to parser? What could it mean in parser?
+ # FIXME pass to parser? What could it mean in parser?
  'verbose|v' => sub {set_from_cmdline('VERBOSE', $_[1]); 
                      push @texi2dvi_args, '--verbose'; },
  'document-language=s' => sub {
@@ -490,11 +490,11 @@
      if ($value =~ /^undef$/i) {
        $value = undef;
      }
-     # special case, this is a pseudo format for debug
+     # special case, this is a pseudo format for debug
      if ($var eq 'DEBUGCOUNT') {
        $format = 'debugcount';
      } else {
-     # this is very wrong, but a way to avoid a spurious warning.
+     # this is very wrong, but a way to avoid a spurious warning.
        no warnings 'once';
        if (set_from_cmdline ($var, $value) 
            and exists($Texinfo::Parser::default_configuration{$var})) {
@@ -571,8 +571,8 @@
 
 if (get_conf('SPLIT') and !$formats_table{$format}->{'split'}) {
   document_warn (sprintf(__('Ignoring splitting for format %s'), $format));
-  # FIXME see if the following is required.  Should not be
-  # since defaults are per format.
+  # FIXME see if the following is required.  Should not be
+  # since defaults are per format.
   #set_from_cmdline('SPLIT', ''); 
   #set_from_cmdline('FRAMES', 0); 
 }
@@ -642,7 +642,7 @@
   }
 
   if (defined(get_conf('DUMP_TREE'))) {
-    # this is very wrong, but a way to avoid a spurious warning.
+    # this is very wrong, but a way to avoid a spurious warning.
     no warnings 'once';
     local $Data::Dumper::Purity = 1;
     no warnings 'once';
@@ -672,7 +672,7 @@
     next;
   }
   Texinfo::Structuring::associate_internal_references($parser);
-  # every format needs the sectioning structure
+  # every format needs the sectioning structure
   my $structure = Texinfo::Structuring::sectioning_structure($parser, $tree);
   # this can be done for every format, since information is already gathered
   my $floats = $parser->floats_information();

Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- Texinfo/Common.pm   19 Mar 2011 16:20:30 -0000      1.23
+++ Texinfo/Common.pm   20 Mar 2011 20:47:48 -0000      1.24
@@ -22,7 +22,7 @@
 
 use strict;
 
-# for unicode/layer support in binmode
+# for unicode/layer support in binmode
 use 5.006;
 
 # to determine the null file
@@ -559,7 +559,7 @@
   if (defined($encoding)) {
     if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
       binmode($filehandle, ':utf8');
-    } else { # FIXME also right for shiftijs or similar encodings?
+    } else { # FIXME also right for shiftijs or similar encodings?
       binmode($filehandle, ':bytes');
     }
     binmode($filehandle, ":encoding($encoding)");

Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -b -r1.226 -r1.227
--- Texinfo/Parser.pm   20 Mar 2011 20:29:00 -0000      1.226
+++ Texinfo/Parser.pm   20 Mar 2011 20:47:49 -0000      1.227
@@ -955,8 +955,8 @@
         { 'type' => 'macro_arg', 'text' => $formal_arg, 
           'parent' => $macro};
       if ($formal_arg !~ /^[\w\-]+$/) {
-        $self->line_error(sprintf($self->__("Bad or empty address@hidden 
formal argument: %s"),
-                                           $formal_arg), $line_nr);
+        $self->line_error(sprintf($self->__("Bad or empty address@hidden 
formal argument: %s"),
+                                           $command, $formal_arg), $line_nr);
         $macro->{'extra'}->{'invalid_syntax'} = 1;
       }
       $macro->{'extra'}->{'args_index'}->{$formal_arg} = $index;

Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- Texinfo/Structuring.pm      12 Mar 2011 00:24:38 -0000      1.41
+++ Texinfo/Structuring.pm      20 Mar 2011 20:47:49 -0000      1.42
@@ -191,7 +191,7 @@
   # holds the current number for all the levels.  It is not possible to use
   # something like the last child index, because of @unnumbered.
   my @command_numbers;
-  # keep track of the unnumbered
+  # keep track of the unnumbered
   my @command_unnumbered;
   foreach my $content (@{$root->{'contents'}}) {
     if ($content->{'cmdname'} and $content->{'cmdname'} ne 'node'
@@ -252,7 +252,7 @@
               if ($content->{'cmdname'} eq 'part') {
                 $new_upper_element = 1;
                 if ($level < $up->{'level'}) {
-                  # FIXME warn previous element too low
+                  # FIXME warn previous element too low
                 }
               } else {
                 $self->line_error(sprintf($self->__(
@@ -306,7 +306,7 @@
           $content->{'number'} = $command_numbers[$number_top_level];
           for (my $i = $number_top_level+1; $i <= $content->{'level'}; $i++) {
             $content->{'number'} .= ".$command_numbers[$i]";
-            # If there is an unnumbered above, then no number is added.
+            # If there is an unnumbered above, then no number is added.
             if ($command_unnumbered[$i]) {
               delete $content->{'number'};
               last;
@@ -499,12 +499,12 @@
       }
     }
     # A bit of explanation about 
!$node->{'node_up'}->{'extra'}->{'normalized'}:
-    # it may happen (rarely) that the node_up has only a manual entry
-    # and therefore !$node->{'node_up'}->{'extra'}->{'normalized'}
-    # In that case there is always a {'manual_content'} and the condition 
-    # !$node->{'node_up'}->{'extra'}->{'manual_content'} is never set.
+    # it may happen (rarely) that the node_up has only a manual entry
+    # and therefore !$node->{'node_up'}->{'extra'}->{'normalized'}
+    # In that case there is always a {'manual_content'} and the condition 
+    # !$node->{'node_up'}->{'extra'}->{'manual_content'} is never set.
     # The node_up should always be different from the menu_up, therefore
-    # if in a menu, the second condition/error message applies.
+    # if in a menu, the second condition/error message applies.
     if ($node->{'node_up'} and (!$node->{'menu_up_hash'}
          or !$node->{'node_up'}->{'extra'}->{'normalized'}
          or 
!$node->{'menu_up_hash'}->{$node->{'node_up'}->{'extra'}->{'normalized'}})) {

Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- Texinfo/Convert/Info.pm     20 Mar 2011 20:29:01 -0000      1.48
+++ Texinfo/Convert/Info.pm     20 Mar 2011 20:47:49 -0000      1.49
@@ -130,8 +130,8 @@
     $fh = $self->Texinfo::Common::open_out ($self->{'OUTFILE'}, 
                                             $self->{'perl_encoding'});
     if (!$fh) {
-      $self->document_error(sprintf($self->__("Could not open %s for writing: 
$!"),
-                                    $self->{'OUTFILE'}));
+      $self->document_error(sprintf($self->__("Could not open %s for writing: 
%s"),
+                                    $self->{'OUTFILE'}, $!));
       return undef;
     }
     #$self->{'fh'} = $fh;
@@ -178,8 +178,8 @@
         if ($out_file_nr == 1) {
           unless (rename ($self->{'OUTFILE'}, 
                           $self->{'OUTFILE'}.'-'.$out_file_nr)) {
-            $self->document_error(sprintf($self->__("Rename %s failed: $!"), 
-                                         $self->{'OUTFILE'}));
+            $self->document_error(sprintf($self->__("Rename %s failed: %s"), 
+                                         $self->{'OUTFILE'}, $!));
           }
           push @{$self->{'opened_files'}}, 
                    $self->{'OUTFILE'}.'-'.$out_file_nr;
@@ -193,8 +193,8 @@
                                $self->{'perl_encoding'});
         if (!$fh) {
            $self->document_error(sprintf(
-                  $self->__("Could not open %s for writing: $!"),
-                  $self->{'OUTFILE'}.'-'.$out_file_nr));
+                  $self->__("Could not open %s for writing: %s"),
+                  $self->{'OUTFILE'}.'-'.$out_file_nr, $!));
            return undef;
         }
         #$self->{'fh'} = $fh;
@@ -213,8 +213,8 @@
                                            $self->{'perl_encoding'});
     if (!$fh) {
       $self->document_error(sprintf(
-            $self->__("Could not open %s for writing: $!"),
-            $self->{'OUTFILE'}));
+            $self->__("Could not open %s for writing: %s"),
+            $self->{'OUTFILE'}, $!));
       return undef;
     }
     $tag_text = $header;

Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -b -r1.123 -r1.124
--- Texinfo/Convert/Plaintext.pm        20 Mar 2011 20:29:01 -0000      1.123
+++ Texinfo/Convert/Plaintext.pm        20 Mar 2011 20:47:49 -0000      1.124
@@ -523,8 +523,8 @@
   my $fh = $self->Texinfo::Common::open_out ($outfile,
                                              $self->{'perl_encoding'});
   if (!$fh) {
-    $self->document_error(sprintf($self->__("Could not open %s for writing: 
$!"),
-                                  $outfile));
+    $self->document_error(sprintf($self->__("Could not open %s for writing: 
%s"),
+                                  $outfile, $!));
     return undef;
   }
   #$self->{'fh'} = $fh;



reply via email to

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