Commit e247e514 authored by arjen@fred.bitbike.com's avatar arjen@fred.bitbike.com
Browse files

Bundle of O'Reilly-related fixups, mostly table column-width related.

parent 4328a8cf
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@ msg ("Adding closing / to XREF and COLSPEC tags...");
$data =~ s{<(xref|colspec) (.+?)>}
          {<$1 $2 />}gs;

# arjen 2002-04-26
msg ("Removing separate target titles from LINKs and make them XREFs...");
$data =~ s{<link (linkend=.+?)>.+?</link>}
          {<xref $1 />}gs;

# Probably need to strip these
msg ('Adding "See " to XREFs that used to be @xref...');
$data =~ s{([.'!)])\s*<xref }
@@ -77,11 +82,6 @@ msg ('Adding "see " to (XREFs) that used to be (@pxref)...');
$data =~ s{([([,;])(\s*)<xref }
          {$1$2see <xref }gs;

# arjen 2002-04-26
msg ("Removing separate target titles from LINKs and make them XREFs...");
$data =~ s{<link (linkend=.+?)>.+?</link>}
          {<xref $1 />}gs;

msg ("Making first row in table THEAD...");
$data =~ s{( *)<tbody>(\s*<row>.+?</row>)}
          {$1<thead>$2\n$1</thead>\n$1<tbody>}gs;
+7 −5
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
# Implemented in Perl by jeremy@mysql.com
# 2001-11-20 Fixups by arjen@mysql.com, 2 keywords and 15 synonyms were missing
# 2001-12-07 Fixup by arjen@mysql.com, add column headings for multitable.
# 2002-05-01 Fixup by arjen@mysql.com, use 3 columns instead of 4.

print STDERR "Scanning lex.h for symbols..\n";
open LEX, "<../sql/lex.h";
@@ -40,11 +41,11 @@ print STDERR "Sorting array...\n";

printf STDERR "There are %i reserved words.\n", scalar @words;

@pre  = ("\@item", "\@tab", " \@tab", "\@tab");
@post = ("", "\n", "", "\n");
@pre  = ("\@item", " \@tab", " \@tab");
@post = ("\n", "\n", "\n");

for($i=0; $word = shift(@words); $i++) {
  $list .= sprintf "%s %-30s %s", $pre[$i%4], "\@code\{$word\}", $post[$i%4];
  $list .= sprintf "%s %-30s %s", $pre[$i%3], "\@code\{$word\}", $post[$i%3];
}; $list .= "\n";

open OLD, "<manual.texi";
@@ -54,8 +55,9 @@ print STDERR "Copying beginning of manual.texi...\n";
while(($line = <OLD>) !~ /START_OF_RESERVED_WORDS/) { print NEW $line; };
print NEW "\@c START_OF_RESERVED_WORDS\n\n";
print STDERR "Inserting list of reserved words...\n";
print NEW "\@multitable \@columnfractions .25 .25 .25 .25\n";
print NEW "\@item \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word}\n";
# Ensure the fractions add up to 100% otherwise it looks funny in print:
print NEW "\@multitable \@columnfractions .33 .33 .34\n";
print NEW "\@item \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word}\n";
print NEW $list;
print NEW "\@end multitable\n";
print STDERR "Skipping over old list...\n";
+233 −140

File changed.

Preview size limit exceeded, changes collapsed.