| 79 | // Like lprintf but always prints even if print_g is false. |
| 80 | |
| 81 | void lprintf_always(const char* format, ...) |
| 82 | { |
| 83 | char s[SBIG]; |
| 84 | va_list args; |
| 85 | va_start(args, format); |
| 86 | VSPRINTF(s, format, args); |
| 87 | va_end(args); |
| 88 | printf("%s", s); |
| 89 | fflush(stdout); // flush so if there is a crash we can see what happened |
| 90 | if (logfile_g) |
| 91 | { |
| 92 | // we don't check fputs here, to prevent recursive calls and msgs |
| 93 | fputs(s, logfile_g); |
| 94 | fflush(logfile_g); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // Like puts but prints to the log file as well if it is open, |
| 99 | // and does not append a newline. |
no outgoing calls
no test coverage detected