4 $cgipath = "http://www.infodrom.north.de/cgi-bin/man2html";
6 # Read 'names' and provide %name
12 if (open (N, "names")) {
18 $name{$foo[0]} = $foo[1] . ":" . $foo[2];
25 # Read 'done' and provide %done
31 if (open (N, "done")) {
37 $done{$foo[0]} = $foo[1];
44 # Read 'mailed' and provide %mailed
50 if (open (N, "mailed")) {
56 $mailed{$foo[0]} = $foo[1];
63 # Find all english manpages
67 my @dpkg = ('/var/lib/dpkg/info/manpages.list','/var/lib/dpkg/info/manpages-dev.list');
70 foreach $file (@dpkg) {
71 if (open (F, $file)) {
73 next until (/\/usr\/share\/man\/man.\/(.*)\.gz/);
83 # Find all german manpages
87 my @dpkg = ('/var/lib/dpkg/info/manpages-de.list','/var/lib/dpkg/info/manpages-de-dev.list');
92 foreach $file (@dpkg) {
93 if (open (F, $file)) {
95 next until (/\/usr(\/share)?\/man\/de\/man.\/(.*)\.gz/);
102 %hash = read_done ();
103 foreach $p (keys %hash) {
104 foreach $q (split (/,/, $hash{$p})) {
108 %hash = read_mailed ();
109 foreach $p (keys %hash) {
110 foreach $q (split (/,/, $hash{$p})) {
124 $fname = "/usr/share/man/man$section/$page.$section.gz";
125 return 1 if (-l $fname);
126 $fname = "/usr/man/man$section/$page.$section.gz";
127 return 1 if (-l $fname);
138 $fname = "/usr/share/man/man$section/$page.$section.gz";
140 @statrec = stat ($fname);
143 $fname = "/usr/man/man$section/$page.$section.gz";
145 @statrec = stat ($fname);
158 $fname = "/usr/share/man/man$section/$page.$section.gz";
160 if (open (F, "zcat $fname|")) {
164 @descr = split ('\\- ');
165 $name = $descr[1] if (!$name);
170 $fname = "/usr/man/man$section/$page.$section.gz";
172 if (open (F, "zcat $fname|")) {
176 @descr = split('\\- ');
177 $name = $descr[1] if (!$name);
183 $name = " " if (!$name);