5
5
6
6
#include " bx_p.h"
7
7
#include < bx/allocator.h>
8
+ #include < bx/file.h>
8
9
#include < bx/hash.h>
9
- #include < bx/readerwriter.h>
10
10
#include < bx/string.h>
11
11
12
12
namespace bx
@@ -1153,10 +1153,10 @@ namespace bx
1153
1153
SizerWriter sizer;
1154
1154
va_list argListCopy;
1155
1155
va_copy (argListCopy, _argList);
1156
- int32_t size = write (&sizer, _format, argListCopy, &err);
1156
+ int32_t total = write (&sizer, _format, argListCopy, &err);
1157
1157
va_end (argListCopy);
1158
1158
1159
- return size ;
1159
+ return total ;
1160
1160
}
1161
1161
1162
1162
int32_t snprintf (char * _out, int32_t _max, const char * _format, ...)
@@ -1165,6 +1165,28 @@ namespace bx
1165
1165
va_start (argList, _format);
1166
1166
int32_t total = vsnprintf (_out, _max, _format, argList);
1167
1167
va_end (argList);
1168
+
1169
+ return total;
1170
+ }
1171
+
1172
+ int32_t vprintf (const char * _format, va_list _argList)
1173
+ {
1174
+ Error err;
1175
+ va_list argListCopy;
1176
+ va_copy (argListCopy, _argList);
1177
+ int32_t total = write (getStdOut (), _format, argListCopy, &err);
1178
+ va_end (argListCopy);
1179
+
1180
+ return total;
1181
+ }
1182
+
1183
+ int32_t printf (const char * _format, ...)
1184
+ {
1185
+ va_list argList;
1186
+ va_start (argList, _format);
1187
+ int32_t total = vprintf (_format, argList);
1188
+ va_end (argList);
1189
+
1168
1190
return total;
1169
1191
}
1170
1192
0 commit comments