version 1.29, 2003/09/19 10:32:24 |
version 1.30, 2003/11/01 20:20:57 |
|
|
sigprocmask(SIG_BLOCK, &mask, &oldmask); |
sigprocmask(SIG_BLOCK, &mask, &oldmask); |
init_screen(); |
init_screen(); |
(void) signal(SIGINT, leave); |
(void) signal(SIGINT, leave); |
|
siginterrupt(SIGINT, 1); |
(void) signal(SIGQUIT, leave); |
(void) signal(SIGQUIT, leave); |
(void) signal(SIGTSTP, tstop); |
(void) signal(SIGTSTP, tstop); |
(void) signal(SIGWINCH, winch); |
(void) signal(SIGWINCH, winch); |
|
|
*/ |
*/ |
if (poll(pfd, 1, delay * 1000) > 0) { |
if (poll(pfd, 1, delay * 1000) > 0) { |
char *errmsg; |
char *errmsg; |
|
ssize_t len; |
int newval; |
int newval; |
|
|
clear_message(); |
clear_message(); |
|
|
* now read it and convert to |
* now read it and convert to |
* command strchr |
* command strchr |
*/ |
*/ |
(void) read(0, &ch, 1); |
while (1) { |
|
len = read(0, &ch, 1); |
|
if (len == -1 && errno == EINTR) |
|
continue; |
|
if (len == 0) |
|
exit(1); |
|
break; |
|
} |
if ((iptr = strchr(command_chars, ch)) == NULL) { |
if ((iptr = strchr(command_chars, ch)) == NULL) { |
/* illegal command */ |
/* illegal command */ |
new_message(MT_standout, " Command not understood"); |
new_message(MT_standout, " Command not understood"); |
|
|
show_help(); |
show_help(); |
standout("Hit any key to continue: "); |
standout("Hit any key to continue: "); |
fflush(stdout); |
fflush(stdout); |
(void) read(0, &ch, 1); |
while (1) { |
|
len = read(0, &ch, 1); |
|
if (len == -1 && errno == EINTR) |
|
continue; |
|
if (len == 0) |
|
exit(1); |
|
break; |
|
} |
break; |
break; |
|
|
case CMD_errors: /* show errors */ |
case CMD_errors: /* show errors */ |
|
|
show_errors(); |
show_errors(); |
standout("Hit any key to continue: "); |
standout("Hit any key to continue: "); |
fflush(stdout); |
fflush(stdout); |
(void) read(0, &ch, 1); |
while (1) { |
|
len = read(0, &ch, 1); |
|
if (len == -1 && errno == EINTR) |
|
continue; |
|
if (len == 0) |
|
exit(1); |
|
break; |
|
} |
} |
} |
break; |
break; |
|
|