The hangup check added to xwaitforspace() (which gets tty user's
response to --More-- and "Press Return to continue: ") wouldn't be good
enough if hangup occurred while that routine's input loop was executing.
register int c, x = ttyDisplay ? (int) ttyDisplay->dismiss_more : '\n';
morc = 0;
+ while (
#ifdef HANGUPHANDLING
- if (program_state.done_hup) return;
+ !program_state.done_hup &&
#endif
+ (c = tty_nhgetch()) != EOF) {
+ if (c == '\n') break;
- while((c = tty_nhgetch()) != '\n') {
if(iflags.cbreak) {
- if (c == EOF || c == '\033') {
- ttyDisplay->dismiss_more = 1;
+ if (c == '\033') {
+ if (ttyDisplay) ttyDisplay->dismiss_more = 1;
morc = '\033';
break;
}
tty_nhbell();
}
}
-
}
/*