MwStringPrintIntoBuffer

This commit is contained in:
IoI_xD 2026-03-30 11:14:33 -07:00
commit 35d2b4bb76
21 changed files with 233 additions and 331 deletions

View file

@ -37,3 +37,15 @@ void MwStringTime(char* out, time_t t) {
sprintf(out, "%s %2d %02d:%02d %d", months[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, 1900 + tm->tm_year);
}
}
void MwPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) {
va_list va;
va_start(va, fmt);
#if __STDC_VERSION__ >= 199901L
vsnprintf(out, size, fmt, va);
#else
vsprintf(out, fmt, va);
#endif
va_end(va);
};