#include #include #include "oni_stdio.h" #include "Daodan_Utility.h" #include "BFW_Utility.h" void __cdecl DDrStartupMessage(const char* fmt, ...) { va_list ap; va_start(ap, fmt); char* buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1); vsprintf(buffer, fmt, ap); va_end(ap); if (!ONgFileStartup) if (!(ONgFileStartup = oni_fopen("startup.txt", "w"))) return; oni_fprintf(ONgFileStartup, "%s\n", buffer); free(buffer); oni_fflush(ONgFileStartup); return; }