ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/shell.pl
(Generate patch)

Comparing Coro/myhttpd/shell.pl (file contents):
Revision 1.23 by root, Sat Dec 8 21:01:17 2007 UTC vs.
Revision 1.24 by root, Wed Nov 19 11:41:06 2008 UTC

17abbrev \%complete, @commands; 17abbrev \%complete, @commands;
18 18
19sub shell { 19sub shell {
20 my $fh = shift; 20 my $fh = shift;
21 21
22 while (defined (print $fh "cmd> "), $_ = <$fh>) { 22 while (defined (print $fh "cmd> "), $_ = $fh->readline) {
23 s/\015?\012$//; 23 s/\015?\012$//;
24 if (s/^(\S+)\s*// && (my $cmd = $complete{$1})) { 24 if (s/^(\S+)\s*// && (my $cmd = $complete{$1})) {
25 if ($cmd eq "quit") { 25 if ($cmd eq "quit") {
26 print $fh "bye bye.\n";#d# 26 print $fh "bye bye.\n";#d#
27 last; 27 last;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines