| 560 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 561 | |
| 562 | staticfn void |
| 563 | vraw_printf(const char *line, va_list the_args) |
| 564 | { |
| 565 | char pbuf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */ |
| 566 | |
| 567 | if (strchr(line, '%')) { |
| 568 | (void) vsnprintf(pbuf, sizeof(pbuf), line, the_args); |
| 569 | line = pbuf; |
| 570 | } |
| 571 | if ((int) strlen(line) > BUFSZ - 1) { |
| 572 | if (line != pbuf) |
| 573 | line = strncpy(pbuf, line, BUFSZ - 1); |
| 574 | /* unlike pline, we don't futz around to keep last few chars */ |
| 575 | pbuf[BUFSZ - 1] = '\0'; /* terminate strncpy or truncate vsprintf */ |
| 576 | } |
| 577 | raw_print(line); |
| 578 | execplinehandler(line); |
| 579 | if (!program_state.beyond_savefile_load) |
| 580 | ge.early_raw_messages++; |
| 581 | } |
| 582 | |
| 583 | void |
| 584 | impossible(const char *s, ...) |
no test coverage detected