summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-08-07 20:51:58 (GMT)
committerFred Drake <fdrake@acm.org>1998-08-07 20:51:58 (GMT)
commit4d10b43c2669c9649e158c2c1be745c584cfcaca (patch)
treed62f87eeff9ae0ab8afe7341f65c5d37072cc16e /Doc
parent077fffa87411a3a80e694723514c2bdf98ab5ec9 (diff)
downloadcpython-4d10b43c2669c9649e158c2c1be745c584cfcaca.zip
cpython-4d10b43c2669c9649e158c2c1be745c584cfcaca.tar.gz
cpython-4d10b43c2669c9649e158c2c1be745c584cfcaca.tar.bz2
insert_index(): Take two additional parameters: $columns and $letters. Call
buildindex.py appropriately. add_idx(), add_module_idx(): Add the appropriate parameters to the calls to insert_index().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/perl/l2hinit.perl18
1 files changed, 13 insertions, 5 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index fd1c281..9f8c04e 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -31,8 +31,9 @@ $BODYTEXT = 'bgcolor="#ffffff"';
$CHILDLINE = "\n<p><hr>\n";
$VERBOSITY = 0;
-# default # of columns for the index
+# default # of columns for the indexes
$INDEX_COLUMNS = 2;
+$MODULE_INDEX_COLUMNS = 5;
# A little painful, but lets us clean up the top level directory a little,
@@ -194,15 +195,22 @@ sub make_index_entry {
sub insert_index{
- my($mark,$datafile) = @_;
- my $index = `$myrootdir/tools/buildindex.py --columns $INDEX_COLUMNS $datafile`;
+ my($mark,$datafile,$columns,$letters) = @_;
+ my $prog = "$myrootdir/tools/buildindex.py";
+ my $index;
+ if ($letters) {
+ $index = `$prog --columns $columns --letters $datafile`;
+ }
+ else {
+ $index = `$prog --columns $columns $datafile`;
+ }
s/$mark/$index/;
}
sub add_idx{
print "\nDoing the index ...";
close(IDXFILE);
- insert_index($idx_mark, 'index.dat');
+ insert_index($idx_mark, 'index.dat', $INDEX_COLUMNS, 1);
}
@@ -218,7 +226,7 @@ sub add_module_idx{
print MODIDXFILE "$Modules{$key}" . $IDXFILE_FIELD_SEP . "$key###\n";
}
close(MODIDXFILE);
- insert_index($idx_module_mark, 'modindex.dat');
+ insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0);
}
# replace both indexes as needed: