summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-11 15:19:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-11-11 15:19:24 +0000
commit3becf983903802e010ac2800e8cd6417cd238985 (patch)
tree61bccf98648baeb7824d4240f0e7f7917e2a04d0
parent163de4c7394f4831394a130526c75cb733e76eb7 (diff)
downloadgnutls-3becf983903802e010ac2800e8cd6417cd238985.tar.gz
*** empty log message ***
-rwxr-xr-xdoc/scripts/gdoc32
1 files changed, 28 insertions, 4 deletions
diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc
index 1c2680513d..48172ba6cf 100755
--- a/doc/scripts/gdoc
+++ b/doc/scripts/gdoc
@@ -319,6 +319,27 @@ sub output_highlight {
}
}
+sub just_highlight {
+ my $contents = join "\n", @_;
+ my $line;
+ my $ret = "";
+
+ foreach $pattern (keys %highlights) {
+# print "scanning pattern $pattern ($highlights{$pattern})\n";
+ $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2, $3, $4):gse;
+ }
+ foreach $line (split "\n", $contents) {
+ if ($line eq ""){
+ $ret = $ret . $lineprefix . $blankline;
+ } else {
+ $ret = $ret . $lineprefix . $line;
+ }
+ $ret = $ret . "\n";
+ }
+
+ return $ret;
+}
+
# output in texinfo
sub output_texinfo {
my %args = %{$_[0]};
@@ -441,10 +462,11 @@ sub output_tex {
# print "\n";
$param3 = $args{'parameters'}{$parameter};
- $param3 =~ s/_/\\_/g;
$param3 =~ s/&([a-zA-Z\_]+)/{\\it \1}/g;
- output_highlight($param3);
+ $out = just_highlight($param3);
+ $out =~ s/_/\\_/g;
+ print $out;
}
if ($check==0) {
print "\\item void\n";
@@ -460,13 +482,15 @@ sub output_tex {
print "\\begin{rmfamily}\n";
$sec = $args{'sections'}{$section};
- $sec =~ s/_/\\_/g;
$sec =~ s/\\:/:/g;
$sec =~ s/&([a-zA-Z\_]+)/{\\it \1}/g;
$sec =~ s/->/\$\\rightarrow\$/g;
$sec =~ s/([0-9]+)\^([0-9]+)/\$\{\1\}\^\{\2\}\$/g;
- output_highlight($sec);
+ $out = just_highlight($sec);
+ $out =~ s/_/\\_/g;
+
+ print $out;
print "\\end{rmfamily}\n";
}
print "\n";