ansi files in strings
This commit is contained in:
parent
772ec89da6
commit
07b5568037
13
src/bbs.c
13
src/bbs.c
@ -231,13 +231,24 @@ void timer_handler(int signum) {
|
||||
|
||||
void s_printf(char *fmt, ...) {
|
||||
char buffer[512];
|
||||
int i;
|
||||
int pos;
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buffer, 512, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
s_putstring(buffer);
|
||||
if (fmt[0] == '@' && fmt[1] == '@' && fmt[strlen(fmt)-1] == '@' && fmt[strlen(fmt)-2] == '@') {
|
||||
pos = 0;
|
||||
for (i=2;i<strlen(fmt) - 2;i++) {
|
||||
buffer[pos++] = fmt[i];
|
||||
buffer[pos] = '\0';
|
||||
}
|
||||
s_displayansi_pause(buffer, 0);
|
||||
} else {
|
||||
s_putstring(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
int should_convert_utf8() {
|
||||
|
Reference in New Issue
Block a user