X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/495ae4b01f36d0d8bb0e34a1d7263c2b8224aa4a..e498ab40197936833f696439e78c5cb08e5180cb:/doc/doc-scripts/g2h
diff --git a/doc/doc-scripts/g2h b/doc/doc-scripts/g2h
index e940e669b..b6e292211 100755
--- a/doc/doc-scripts/g2h
+++ b/doc/doc-scripts/g2h
@@ -1,5 +1,4 @@
#! /usr/bin/perl -w
-# $Cambridge: exim/doc/doc-scripts/g2h,v 1.1 2004/10/07 15:04:35 ph10 Exp $
# This is a script that turns the SGCAL source of Exim's documentation into
# HTML. It can be used for both the filter document and the main Exim
@@ -180,6 +179,7 @@ $key = "$text";
$key =~ s/<[^>]+>//g;
$key =~ s/(\d+);/chr($1)/eg;
$key =~ s/^`+//;
+$key =~ s/^"//;
# Turn all spaces in the text into so that they don't ever split.
# However, there may be spaces in the HTML that already exists in the
@@ -654,20 +654,20 @@ elsif (/^\.display\b/)
{
print OUT "
\n";
}
-
+
# Some displays have emphasis inside them
-
+
elsif (/^\.em\b/)
{
print OUT "" if ! $inem;
$inem = 1;
- }
+ }
elsif (/^\.nem\b/)
{
print OUT "" if $inem;
$inem = 0;
- }
+ }
# There are occasional instances of .if [!]~~sys.fancy inside displays.
# In both cases we want the non-fancy alternative. (The only thing that
@@ -689,10 +689,10 @@ elsif (/^\.display\b/)
# Ignore .newline and .linelength
elsif (/^\.newline\b/ || /^\.linelength\b/) {}
-
+
# Ignore comments
-
- elsif (/^\.(\s|$)/) {}
+
+ elsif (/^\.(\s|$)/) {}
# There shouldn't be any other directives inside displays
@@ -755,7 +755,10 @@ elsif (/^\.display\b/)
# Handle configuration option definitions
-elsif (/^\.startconf\b/) {}
+elsif (/^\.startconf\s+(.*)/)
+ {
+ $confuse = &handle_text($1);
+ }
elsif (/^\.conf\b/)
{
@@ -781,6 +784,7 @@ elsif (/^\.conf\b/)
&setpar(0);
&handle_index($option, 0);
print OUT "
\n"; @@ -1314,19 +1321,24 @@ my($letter) = ""; print INDEX "
\n";
foreach $key (sort
- { ("\L$a" eq "\L$b")? ("$a" cmp "$b") : ("\L$a" cmp "\L$b") }
+ {
+ my($aa) = $a;
+ my($bb) = $b;
+
+ $aa =~ s/^\x93//; # Seems like the actual char values are
+ $bb =~ s/^\x93//; # set by this time, not ""
+
+ return ("\L$aa" eq "\L$bb")? ("$aa" cmp "$bb") : ("\L$aa" cmp "\L$bb");
+ }
keys %$hash)
{
my($initial) = substr($key,0,1);
$initial = "\U$initial";
- if ($initial ne $letter)
+ if ($initial ne $letter && $initial ge "A" && $initial le "Z")
{
- if ($initial ge "A")
- {
- print INDEX "
\n" if $letter ne "";
- print INDEX "\n";
- print INDEX "\U$initial\E
\n";
- }
+ print INDEX "
\n";
+ print INDEX "\n";
+ print INDEX "\U$initial\E
\n";
$letter = $initial;
}
print INDEX "$$hash{$key}
\n";
@@ -1367,6 +1379,7 @@ $html = "html";
$chapsplit = 0;
$cindex_tocn = 0;
+$confuse = "";
$file_base = "";
$index_count = 0;
$inem = 0;