texi2html-cvs
[Top][All Lists]
Advanced

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

[Texi2html-cvs] texi2html/examples info.init


From: Patrice Dumas
Subject: [Texi2html-cvs] texi2html/examples info.init
Date: Thu, 23 Apr 2009 17:02:19 +0000

CVSROOT:        /cvsroot/texi2html
Module name:    texi2html
Changes by:     Patrice Dumas <pertusus>        09/04/23 17:02:18

Modified files:
        examples       : info.init 

Log message:
        small code simplification

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/info.init?cvsroot=texi2html&r1=1.30&r2=1.31

Patches:
Index: info.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/info.init,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- info.init   23 Apr 2009 10:00:19 -0000      1.30
+++ info.init   23 Apr 2009 17:02:18 -0000      1.31
@@ -684,20 +684,15 @@
           # if ending a paragraph, go straight to the text addition 
           # without processing of the end of lines. Same if ending a 
           # quotation or an @example
-          if (defined($content->{'command'}))
-          {
               if ($info_default_indented_commands{$content->{'command'}})
               {
                   $indent_level--;
-                  $text_added = $content->{'end'} if 
defined($content->{'end'});
-                  #if ($indent_level > 0 and !$info_state->{'blank_line'} and 
$content->{'command'} ne 'deff_itemx')
                   if ($indent_level > 0 and !$info_state->{'blank_line'} and 
$content->{'command'} !~ /^deff_item/)
                   {
                      $text_added .= "\n";
                   }
                   # this nullify a potential noindent in a random format
                   $info_state->{'indent_para'} = undef;
-                  goto new_text;
               }
               if ($content->{'command'} eq 'paragraph' and 
$info_state->{'align_stack'}->[-1]->{'command'} eq 'normal')
               {
@@ -709,8 +704,6 @@
                   $in_para = 0;
                   $info_state->{'indent_para'} = undef;
                   $text_added .= "\n" unless (($line_char_counter + 
length($text_added)) == 0);
-                  # FIXME needed?
-                  goto new_text;
               }
               elsif ($content->{'command'} eq 'preformatted')
               {
@@ -743,14 +736,14 @@
                   $info_state->{'offset_in_file'} = 
$multitable->{'offset_in_file_kept'};
                   #$info_state->{'line_count'} = 
$multitable->{'line_count_kept'} + $info_state->{'line_count'};
                   $info_state->{'line_count'} = 
$multitable->{'line_count_kept'};
-print STDERR "MULTITABLE close, lines: $multitable->{'line_count_kept'} + 
$all_line_passed\n";
+              print STDERR "MULTITABLE close, lines: 
$multitable->{'line_count_kept'} + $all_line_passed\n";
                   foreach my $anchor_and_index (@{$multitable->{'anchors'}}, 
@{$multitable->{'index_entries'}})
                   {
                       $anchor_and_index->{'line_nr'} += 
$multitable->{'line_count_kept'} + $all_line_passed;
                   }
                   if (! scalar(@{$info_state->{'multitable_stack'}}))
                   {
-print STDERR "MULTITABLE close, lengths: $multitable->{'offset_in_file_kept'} 
+ $length\n";
+                  print STDERR "MULTITABLE close, lengths: 
$multitable->{'offset_in_file_kept'} + $length\n";
                       foreach my $anchor (@{$multitable->{'anchors'}})
                       {
                           $anchor->{'info_offset'} += 
$multitable->{'offset_in_file_kept'} + $length;
@@ -844,7 +837,7 @@
                                   $length += length($spaces);
                               }
                               $anchor->{'info_offset'} = $anchor_position + 
$row_length + $multitable->{'length'};
-print STDERR "ROW anchor close: 
anchor[$anchor->{'cell_idx'}]($multitable->{'cells'}->[$anchor->{'cell_idx'}]->{'beginning'}+$anchor->{'line_char_counter'})
 $anchor_position $anchor->{'info_offset'}\n";
+                          print STDERR "ROW anchor close: 
anchor[$anchor->{'cell_idx'}]($multitable->{'cells'}->[$anchor->{'cell_idx'}]->{'beginning'}+$anchor->{'line_char_counter'})
 $anchor_position $anchor->{'info_offset'}\n";
                               $anchor->{'line_char_counter'} = 
$anchor_position;
                           }
                       }
@@ -857,7 +850,7 @@
                   foreach my $anchor_and_index (@anchors, @indices)
                   {
                       $anchor_and_index->{'line_nr'} += 
$multitable->{'line_count'};
-print STDERR "ROW close: new line count: $anchor_and_index->{'line_nr'} + \n";
+                  print STDERR "ROW close: new line count: 
$anchor_and_index->{'line_nr'} + \n";
                   }
                   if ($content->{'item_command'} eq 'headitem')
                   {
@@ -876,7 +869,6 @@
                   push @{$multitable->{'index_entries'}}, @indices;
               }
           }
-      }
       else
       {
           if ($content->{'command'})
@@ -1094,7 +1086,6 @@
           {
               $text_added .= $content->{'begin'};
           }
-
           elsif (defined($content->{'text'}))
           {
               if ($in_para and !$in_exdent)
@@ -1188,10 +1179,6 @@
       {
          if ($item_pending and !$item_line_added)
          {
-             #if (!$info_state->{'blank_line'})
-             #{
-             #   $text_added = "\n" . $text_added;
-             #}
              ($current, $index, $close) = info_default_skip_spaces($current, 
$index, $close);
              $item_pending = undef;
          }




reply via email to

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