X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fapropos.pl;h=ac1d0f609a9ea792e429b5351f8bbe66170803ca;hb=3d66b51182cb1939154d96def02efb45784958c0;hp=8e4d4eb24fff17d4943e3db394bb13b3038b5771;hpb=d0e9787ea8e709d8cbd91e87e363812e669c0ca6;p=spider.git diff --git a/cmd/apropos.pl b/cmd/apropos.pl index 8e4d4eb2..ac1d0f60 100644 --- a/cmd/apropos.pl +++ b/cmd/apropos.pl @@ -30,7 +30,7 @@ unless ($defh->open("$main::localcmd/Commands_en.hlp")) { } my $h; -unless ($lang ne 'en') { +if ($lang ne 'en') { $h = new IO::File; unless ($h->open("$main::localcmd/Commands_$lang.hlp")) { unless($h->open("$main::cmd/Commands_$lang.hlp")) { @@ -44,6 +44,7 @@ my $include; foreach $in (<$defh>) { next if $in =~ /^\#/; chomp $in; + $in =~ s/\r$//; if ($in =~ /^===/) { $cmd{$cmd} = "$cmd $desc" if $include; $include = 0; @@ -55,7 +56,7 @@ foreach $in (<$defh>) { $include = 1; next; } - $include =~ 1 if $cmd =~ /$line/i; + $include = 1 if $cmd =~ /$line/i; } $cmd{$cmd} = "$cmd $desc" if $include; $defh->close; @@ -66,6 +67,7 @@ if ($h) { foreach $in (<$h>) { next if $in =~ /^\#/; chomp $in; + $in =~ s/\r$//; if ($in =~ /^===/) { $cmd{$cmd} = "$cmd $desc" if $include; $include = 0; @@ -77,7 +79,7 @@ if ($h) { $include = 1; next; } - $include =~ 1 if $cmd =~ /$line/i; + $include = 1 if $cmd =~ /$line/i; } $cmd{$cmd} = "$cmd $desc" if $include; $h->close;