Add More (Y/N/C) to display ansi pause
This commit is contained in:
parent
655e7d87b4
commit
93758c24f2
19
bbs.c
19
bbs.c
@ -293,9 +293,9 @@ void s_putstring(char *c) {
|
||||
void s_displayansi_pause(char *file, int pause) {
|
||||
FILE *fptr;
|
||||
char c;
|
||||
|
||||
char ch;
|
||||
int lines = 0;
|
||||
|
||||
|
||||
fptr = fopen(file, "r");
|
||||
if (!fptr) {
|
||||
return;
|
||||
@ -308,8 +308,19 @@ void s_displayansi_pause(char *file, int pause) {
|
||||
if (c == '\n') {
|
||||
lines++;
|
||||
if (lines == 24) {
|
||||
s_printf(get_string(6));
|
||||
s_getchar();
|
||||
s_printf(get_string(223));
|
||||
ch = s_getchar();
|
||||
s_printf("\r\n");
|
||||
switch(tolower(ch)) {
|
||||
case 'c':
|
||||
pause = 0;
|
||||
break;
|
||||
case 'n':
|
||||
fclose(fptr);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
lines = 0;
|
||||
}
|
||||
}
|
||||
|
@ -221,3 +221,4 @@ File exists!\r\n
|
||||
%s on node %d says:\r\n %s\r\n\r\n
|
||||
\e[0;36mC. \e[1;37mCodepage (\e[1;33m%s\e[1;37m)\r\n
|
||||
\e[0;36mE. \e[1;37mUse External Editor (\e[1;33m%s\e[1;37m)\r\n
|
||||
\e[1;37mMore? (Y/N/C) \e[0m
|
||||
|
Reference in New Issue
Block a user