ansi files in strings
This commit is contained in:
parent
772ec89da6
commit
07b5568037
11
src/bbs.c
11
src/bbs.c
@ -231,14 +231,25 @@ 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);
|
||||
|
||||
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() {
|
||||
if (gUser != NULL) {
|
||||
|
Reference in New Issue
Block a user