gindex.pl
来自「这是一个开放源代码的与WINNT/WIN2K/WIN2003兼容的操作系统」· PL 代码 · 共 27 行
PL
27 行
#!/usr/bin/perl
# Since we use a linear search trought the block and the license and
# the warranty are quite big, we leave them at the end of the help file,
# the index will be consulted quite frequently, so we put it at the beginning.
@help_file = <>;
foreach $line (@help_file){
if ($line =~ /\x4\[(.*)\]/ && $line !~ /\x4\[main\]/){
$nodes[$node_count++] = $1;
$line =~ s/(\x4\[) */$1/;
}
}
print "\x4[Contents]\nTopics:\n\n";
foreach $node (@nodes){
if (length $node){
$node =~ m/^( *)(.*)$/;
printf (" %s\x1 %s \x2%s\x3", $1, $2, $2);
}
print "\n";
}
#foreach $line (@help_file){
# $line =~ s/%NEW_NODE%/\004/g;
#}
print @help_file;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?