Add More (Y/N/C) to display ansi pause

This commit is contained in:
Andrew Pamment 2017-09-20 06:04:47 +10:00
parent 655e7d87b4
commit 93758c24f2
2 changed files with 16 additions and 4 deletions

17
bbs.c
View File

@ -293,7 +293,7 @@ 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");
@ -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;
}
}

View File

@ -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