| Rev | Line | |
|---|
| [269] | 1 | #include <stdlib.h>
|
|---|
| 2 | #include <stdarg.h>
|
|---|
| 3 | #include "oni_stdio.h"
|
|---|
| 4 |
|
|---|
| 5 | #include "Daodan_Utility.h"
|
|---|
| 6 | #include "BFW_Utility.h"
|
|---|
| 7 |
|
|---|
| 8 | void __cdecl DDrStartupMessage(const char* fmt, ...)
|
|---|
| 9 | {
|
|---|
| 10 | va_list ap;
|
|---|
| 11 | va_start(ap, fmt);
|
|---|
| 12 | char* buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1);
|
|---|
| 13 |
|
|---|
| 14 | vsprintf(buffer, fmt, ap);
|
|---|
| 15 | va_end(ap);
|
|---|
| 16 |
|
|---|
| 17 | if (!ONgFileStartup)
|
|---|
| 18 | if (!(ONgFileStartup = oni_fopen("startup.txt", "w")))
|
|---|
| 19 | return;
|
|---|
| 20 |
|
|---|
| 21 | oni_fprintf(ONgFileStartup, "%s\n", buffer);
|
|---|
| 22 | free(buffer);
|
|---|
| 23 |
|
|---|
| 24 | oni_fflush(ONgFileStartup);
|
|---|
| 25 | return;
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.