lines = 0;
page_height = terminal_height;
please_display_more_prompt = 0;
+
+ if (input == 'q')
+ goto end;
}
/*
* allows the user to quit while in the middle of a file.
*/
if (c == '\n') {
- switch (input) {
- case 'q':
- goto end;
- case '\n':
- /* increment by just one line if we are at
- * the end of this line*/
+ /* increment by just one line if we are at
+ * the end of this line */
+ if (input == '\n')
please_display_more_prompt = 1;
- break;
- }
/* Adjust the terminal height for any overlap, so that
* no lines get lost off the top. */
if (len >= terminal_width) {
} while (--argc > 0);
end:
#ifdef BB_FEATURE_USE_TERMIOS
- gotsig(0);
+ setTermSettings(fileno(cin), &initial_settings);
#endif
- return(TRUE);
+ return 0;
}
lines = 0;
page_height = terminal_height;
please_display_more_prompt = 0;
+
+ if (input == 'q')
+ goto end;
}
/*
* allows the user to quit while in the middle of a file.
*/
if (c == '\n') {
- switch (input) {
- case 'q':
- goto end;
- case '\n':
- /* increment by just one line if we are at
- * the end of this line*/
+ /* increment by just one line if we are at
+ * the end of this line */
+ if (input == '\n')
please_display_more_prompt = 1;
- break;
- }
/* Adjust the terminal height for any overlap, so that
* no lines get lost off the top. */
if (len >= terminal_width) {
} while (--argc > 0);
end:
#ifdef BB_FEATURE_USE_TERMIOS
- gotsig(0);
+ setTermSettings(fileno(cin), &initial_settings);
#endif
- return(TRUE);
+ return 0;
}