X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fhelp.pl;h=cc9eee3a1cf3d32e58d3b090212c373b0614d619;hb=eac4538f1f78b3d014539dc548fc6322e8337429;hp=b44457b8b81bb8fe6721344781616ce9f85e863a;hpb=d0e9787ea8e709d8cbd91e87e363812e669c0ca6;p=spider.git diff --git a/cmd/help.pl b/cmd/help.pl index b44457b8..cc9eee3a 100644 --- a/cmd/help.pl +++ b/cmd/help.pl @@ -7,7 +7,7 @@ # # Copyright (c) 1998 - Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; @@ -31,6 +31,9 @@ $lang = 'en' if !$lang; # The fields are:- privilege level, full command name, short description # +#$DB::single = 1; + + my $defh = new IO::File; unless ($defh->open("$main::localcmd/Commands_en.hlp")) { unless($defh->open("$main::cmd/Commands_en.hlp")) { @@ -39,7 +42,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")) { @@ -56,7 +59,7 @@ my $in; $line =~ s{[^\w/]}{}g; $line =~ s{/}{.*/}g; $line =~ s/^\s+//g; -$line =~ s/\s+$//g; +$line =~ s/[\s\r]+$//g; $line = "help" if $line =~ /^\s*$/; # sort out aliases @@ -69,6 +72,7 @@ if ($h) { foreach $in (<$h>) { next if $in =~ /^\#/; chomp $in; + $in =~ s/\r$//; if ($in =~ /^===/) { last if $state == 2; # come out on next command $in =~ s/=== //;