Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2383f6db
Kaydet (Commit)
2383f6db
authored
Mar 02, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improve handling of module index, to deal with platform annotations a little
better.
üst
01bc01c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
7 deletions
+43
-7
l2hinit.perl
Doc/perl/l2hinit.perl
+43
-7
No files found.
Doc/perl/l2hinit.perl
Dosyayı görüntüle @
2383f6db
...
...
@@ -39,7 +39,7 @@ $VERBOSITY = 0;
# default # of columns for the indexes
$INDEX_COLUMNS
=
2
;
$MODULE_INDEX_COLUMNS
=
5
;
$MODULE_INDEX_COLUMNS
=
4
;
# A little painful, but lets us clean up the top level directory a little,
...
...
@@ -247,7 +247,7 @@ sub make_index_entry {
sub
insert_index
{
my
(
$mark
,
$datafile
,
$columns
,
$letters
)
=
@_
;
my
(
$mark
,
$datafile
,
$columns
,
$letters
,
$prefix
)
=
@_
;
my
$prog
=
"$myrootdir/tools/buildindex.py"
;
my
$index
;
if
(
$letters
)
{
...
...
@@ -256,13 +256,13 @@ sub insert_index{
else
{
$index
=
`$prog --columns $columns $datafile`
;
}
s/$mark/$index/
;
s/$mark/$
prefix$
index/
;
}
sub
add_idx
{
print
"\nBuilding HTML for the index ..."
;
close
(
IDXFILE
);
insert_index
(
$idx_mark
,
'index.dat'
,
$INDEX_COLUMNS
,
1
);
insert_index
(
$idx_mark
,
'index.dat'
,
$INDEX_COLUMNS
,
1
,
''
);
}
...
...
@@ -272,20 +272,56 @@ $idx_module_title = 'Module Index';
sub
add_module_idx
{
print
"\nBuilding HTML for the module index ..."
;
my
$key
;
my
$first
=
1
;
my
$prevplat
=
''
;
my
$allthesame
=
1
;
my
$prefix
=
''
;
foreach
$key
(
keys
%
Modules
)
{
$key
=~
s/<tt>([a-zA-Z0-9._]*)<\/tt>/\1/
;
my
$plat
=
"$ModulePlatforms{$key}"
;
$plat
=
''
if
$IGNORE_PLATFORM_ANNOTATION
;
if
(
!
$first
)
{
$allthesame
=
0
if
(
$prevplat
ne
$plat
);
}
else
{
$first
=
0
;
}
$prevplat
=
$plat
;
}
open
(
MODIDXFILE
,
'>modindex.dat'
)
||
die
"\n$!\n"
;
foreach
$key
(
keys
%
Modules
)
{
# dump the line in the data file; just use a dummy seqno field
print
MODIDXFILE
"$Modules{$key}"
.
$IDXFILE_FIELD_SEP
.
"$key###\n"
;
my
$nkey
=
$1
;
my
$moditem
=
"$Modules{$key}"
;
my
$plat
=
''
;
$key
=~
s/<tt>([a-zA-Z0-9._]*)<\/tt>/\1/
;
if
(
$ModulePlatforms
{
$key
}
&&
!
$allthesame
)
{
$plat
=
" <em>($ModulePlatforms{$key})</em>"
;
}
print
MODIDXFILE
$moditem
.
$IDXFILE_FIELD_SEP
.
"<tt class=module>$key</tt>$plat###\n"
;
}
close
(
MODIDXFILE
);
insert_index
(
$idx_module_mark
,
'modindex.dat'
,
$MODULE_INDEX_COLUMNS
,
0
);
if
(
!
$allthesame
)
{
$prefix
=
<<PLAT_DISCUSS;
<p> Some module names are followed by an annotation indicating what
platform they are available on.</p>
PLAT_DISCUSS
}
insert_index
(
$idx_module_mark
,
'modindex.dat'
,
$MODULE_INDEX_COLUMNS
,
0
,
$prefix
);
}
# replace both indexes as needed:
sub
add_idx_hook
{
add_idx
()
if
(
/$idx_mark/
);
add_module_idx
()
if
(
/$idx_module_mark/
);
process_
all_localmoduletables
();
process_
python_state
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment