X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=doc%2Ftexi2pod.pl;h=9c6d8cc27928a958afad368eadcc9f7ab364cfa2;hp=3a9f78a587565ea0b5e1b002088df8a83f207aa2;hb=6633b74930870ffb148c46129c738af78082d934;hpb=a3ce2cb4294da42b883e77b592c605f9bd6f8a9e diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index 3a9f78a5..9c6d8cc2 100755 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -228,11 +228,12 @@ while(<$inf>) { /^\@include\s+(.+)$/ and do { push @instack, $inf; $inf = gensym(); + $file = postprocess($1); # Try cwd and $ibase. - open($inf, "<" . $1) - or open($inf, "<" . $ibase . "/" . $1) - or die "cannot open $1 or $ibase/$1: $!\n"; + open($inf, "<" . $file) + or open($inf, "<" . $ibase . "/" . $file) + or die "cannot open $file or $ibase/$file: $!\n"; next; }; @@ -275,7 +276,6 @@ while(<$inf>) { $ic =~ s/\@(?:code|kbd)/C/; $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; $ic =~ s/\@(?:file)/F/; - $ic =~ s/\@(?:asis)/S/; # punt $_ = "\n=over 4\n"; }; @@ -309,7 +309,7 @@ die "No filename or title\n" unless defined $fn && defined $tl; $sects{NAME} = "$fn \- $tl\n"; $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; -for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT EXAMPLES FILES +for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { if(exists $sects{$sect}) { $head = $sect; @@ -351,6 +351,13 @@ sub postprocess s/\@w\{([^\}]*)\}/S<$1>/g; s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; + # keep references of the form @ref{...}, print them bold + s/\@(?:ref)\{([^\}]*)\}/B<$1>/g; + + # Change double single quotes to double quotes. + s/''/"/g; + s/``/"/g; + # Cross references are thrown away, as are @noindent and @refill. # (@noindent is impossible in .pod, and @refill is unnecessary.) # @* is also impossible in .pod; we discard it and any newline that