X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Ftexi2html;h=7cb22fa94bdc576fb31276f26a3eab240e057a7d;hb=9f013d0930202eea99c21083b71098a0df64be0d;hp=1c40443002076ad747867941fe754bdc665a1394;hpb=264e22e05a19a8f39ab7830ce496a66d022816a1;p=pintos-anon diff --git a/doc/texi2html b/doc/texi2html index 1c40443..7cb22fa 100755 --- a/doc/texi2html +++ b/doc/texi2html @@ -343,7 +343,7 @@ use vars qw( #--############################################################################## # CVS version: -# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $ +# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $ # Homepage: $T2H_HOMEPAGE = "http://texi2html.cvshome.org"; @@ -390,7 +390,7 @@ $THISPROG = "texi2html $THISVERSION"; # program name and version # Copy this file and make changes to it, if you like. # Afterwards, either, load it with command-line option -init_file # -# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $ +# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $ ###################################################################### # stuff which can also be set by command-line options @@ -1863,7 +1863,7 @@ package Getopt::MySimple; # -------------------------------------------------------------------------- # Locally modified by obachman (Display type instead of env, order by cmp) -# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $ +# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $ # use strict; # no strict 'refs'; @@ -2207,6 +2207,7 @@ $index_properties = "?", "?", ".", ".", "-", "", + "/", "", ); # @@ -2252,7 +2253,7 @@ $index_properties = # texinfo styles (@foo{bar}) to HTML ones # %style_map = ( - 'acronym', '&do_acronym', + 'acronym', 'ACRONYM', 'asis', '', 'b', 'B', 'cite', 'CITE', @@ -2352,6 +2353,7 @@ $complex_format_map->{smallformat} = $complex_format_map->{smalldisplay}; 'deftypefn', 0, 'deftypeop', 0, 'deftypevr', 0, + 'deftypecv', 0, 'defcv', 0, 'defop', 0, 'deftp', 0, @@ -2361,6 +2363,7 @@ $complex_format_map->{smallformat} = $complex_format_map->{smalldisplay}; 'deftypefnx', 0, 'deftypeopx', 0, 'deftypevrx', 0, + 'deftypecvx', 0, 'defcvx', 0, 'defopx', 0, 'deftpx', 0, @@ -3440,7 +3443,7 @@ sub pass1 ############################################################# # value substitution before macro expansion, so that # it works in macro arguments - s/\@value{($VARRE)}/$value{$1}/eg; + s/\@value\{($VARRE)}/$value{$1}/eg; ############################################################# # macro substitution @@ -3509,7 +3512,7 @@ sub pass1 $after = ''; } $args =~ s|\\\\|\\|g; - $args =~ s|\\{|{|g; + $args =~ s|\\\{|{|g; $args =~ s|\\}|}|g; if (@{$macros->{$name}->{Args}} > 1) { @@ -3982,6 +3985,11 @@ sub pass1 $type =~ s/^\{(.*)\}$/$1/; print "# def ($tag): {$type} ", join(', ', @args), "\n" if $T2H_DEBUG & $DEBUG_DEF; + if ($tag eq 'deftypecv') { + my $class = shift (@args); + $class =~ s/^\{(.*)\}$/$1/; + $type .= " of $class"; + } $type .= ':' if (!$T2H_DEF_TABLE); # it's nicer like this $name = shift(@args); $name =~ s/^\{(.*)\}$/$1/; @@ -4025,7 +4033,7 @@ sub pass1 } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' || $tag eq 'deftypeop' || $tag eq 'defcv' - || $tag eq 'defop') + || $tag eq 'defop' || $tag eq 'deftypecv') { $ftype = $name; $name = shift(@args); @@ -4040,8 +4048,9 @@ sub pass1 } else { - $_ .= "$type $ftype $name"; - $_ .= " @args" if @args; + my $sep = $ftype =~ /\*$/ ? '' : ' '; + $_ .= "$type $ftype$sep$name"; + $_ .= " @args" if @args; } } else @@ -4911,7 +4920,7 @@ sub pass2 # # xref # - while (/\@(x|px|info|)ref{([^{}]+)(}?)/) + while (/\@(x|px|info|)ref\{([^{}]+)(}?)/) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); @@ -5635,10 +5644,10 @@ sub update_sec_num my $ret; $level--; # here we start at 0 - if ($name =~ /^appendix/ || defined(@appendix_sec_num)) + if ($name =~ /^appendix/ || @appendix_sec_num) { # appendix style - if (defined(@appendix_sec_num)) + if (@appendix_sec_num) { &incr_sec_num($level, @appendix_sec_num); } @@ -5651,7 +5660,7 @@ sub update_sec_num else { # normal style - if (defined(@normal_sec_num)) + if (@normal_sec_num) { &incr_sec_num($level, @normal_sec_num); } @@ -6119,7 +6128,7 @@ sub apply_style else { # no style } - $text = "\`$text\'" if $do_quotes; + $text = "$text" if $do_quotes; } else { # unknown style @@ -6154,7 +6163,7 @@ sub substitute_style { $changed = 0; $done = ''; - while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) + while (/\@(\w+)\{([^\{\}]+)}/ || /\@(,)\{([^\{\}]+)}/) { $text = &apply_style($1, $2); if ($text)