version 1.8, 2001/07/17 02:23:58 |
version 1.9, 2001/07/27 17:13:42 |
|
|
} |
} |
else |
else |
{ |
{ |
putchar('\n'); |
if (putchar('\n') == EOF) |
|
exit(1); |
} |
} |
dostates = Yes; |
dostates = Yes; |
} |
} |
|
|
{ |
{ |
/* illegal command */ |
/* illegal command */ |
new_message(MT_standout, " Command not understood"); |
new_message(MT_standout, " Command not understood"); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
no_command = Yes; |
no_command = Yes; |
} |
} |
else |
else |
|
|
/* error */ |
/* error */ |
new_message(MT_standout, |
new_message(MT_standout, |
" Command cannot be handled by this terminal"); |
" Command cannot be handled by this terminal"); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
no_command = Yes; |
no_command = Yes; |
} |
} |
else switch(change) |
else switch(change) |
|
|
{ |
{ |
new_message(MT_standout, |
new_message(MT_standout, |
" Currently no errors to report."); |
" Currently no errors to report."); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
no_command = Yes; |
no_command = Yes; |
} |
} |
else |
else |
|
|
new_message(MT_standout | MT_delayed, |
new_message(MT_standout | MT_delayed, |
" This terminal can only display %d processes.", |
" This terminal can only display %d processes.", |
max_topn); |
max_topn); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
} |
} |
|
|
if (newval == 0) |
if (newval == 0) |
|
|
if ((errmsg = kill_procs(tempbuf2)) != NULL) |
if ((errmsg = kill_procs(tempbuf2)) != NULL) |
{ |
{ |
new_message(MT_standout, "%s", errmsg); |
new_message(MT_standout, "%s", errmsg); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
no_command = Yes; |
no_command = Yes; |
} |
} |
} |
} |
|
|
if ((errmsg = renice_procs(tempbuf2)) != NULL) |
if ((errmsg = renice_procs(tempbuf2)) != NULL) |
{ |
{ |
new_message(MT_standout, "%s", errmsg); |
new_message(MT_standout, "%s", errmsg); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
no_command = Yes; |
no_command = Yes; |
} |
} |
} |
} |
|
|
new_message(MT_standout | MT_delayed, |
new_message(MT_standout | MT_delayed, |
" %sisplaying idle processes.", |
" %sisplaying idle processes.", |
ps.idle ? "D" : "Not d"); |
ps.idle ? "D" : "Not d"); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
break; |
break; |
|
|
case CMD_user: |
case CMD_user: |
|
|
{ |
{ |
ps.uid = i; |
ps.uid = i; |
} |
} |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
} |
} |
else |
else |
{ |
{ |
|
|
{ |
{ |
order_index = i; |
order_index = i; |
} |
} |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
} |
} |
else |
else |
{ |
{ |
|
|
|
|
default: |
default: |
new_message(MT_standout, " BAD CASE IN SWITCH!"); |
new_message(MT_standout, " BAD CASE IN SWITCH!"); |
putchar('\r'); |
if (putchar('\r') == EOF) |
|
exit(1); |
} |
} |
} |
} |
|
|