Made the names of format string arguments across the board consistent. Only the "public" functions in the testing library are kept expanded for documentation purposes.
This commit is contained in:
parent
76fabb37cf
commit
a8ad49fead
|
@ -22,14 +22,13 @@ bool uiInit(void *options, uiInitError *err)
|
|||
return true;
|
||||
}
|
||||
|
||||
// TODO rename all msgs to fmt
|
||||
bool uiprivInitReturnErrorf(uiInitError *err, const char *msg, ...)
|
||||
bool uiprivInitReturnErrorf(uiInitError *err, const char *fmt, ...)
|
||||
{
|
||||
int n;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, msg);
|
||||
n = uiprivVsnprintf(err->Message, 256, msg, ap);
|
||||
va_start(ap, fmt);
|
||||
n = uiprivVsnprintf(err->Message, 256, fmt, ap);
|
||||
va_end(ap);
|
||||
if (n < 0)
|
||||
uiprivInternalError("encoding error returning initialization error; this means something is very very wrong with libui itself");
|
||||
|
|
|
@ -30,7 +30,7 @@ extern "C" {
|
|||
|
||||
// main.c
|
||||
extern bool uiprivSysInit(void *options, uiInitError *err);
|
||||
extern bool uiprivInitReturnErrorf(uiInitError *err, const char *msg, ...);
|
||||
extern bool uiprivInitReturnErrorf(uiInitError *err, const char *fmt, ...);
|
||||
extern void uiprivSysQueueMain(void (*f)(void *data), void *data);
|
||||
extern bool uiprivCheckInitializedAndThreadImpl(const char *func);
|
||||
#define uiprivCheckInitializedAndThread() uiprivCheckInitializedAndThreadImpl(uiprivFunc)
|
||||
|
|
|
@ -188,7 +188,7 @@ void testingprivTLogfFull(testingT *t, const char *file, long line, const char *
|
|||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
va_start(ap, fmt);
|
||||
testingprivTLogvfFull(t, file, line, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
|
|
@ -31,23 +31,23 @@ void testingprivInternalError(const char *fmt, ...)
|
|||
#undef sharedbitsStatic
|
||||
#undef sharedbitsPrefix
|
||||
|
||||
int testingprivVsnprintf(char *s, size_t n, const char *format, va_list ap)
|
||||
int testingprivVsnprintf(char *s, size_t n, const char *fmt, va_list ap)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = testingprivImplVsnprintf(s, n, format, ap);
|
||||
ret = testingprivImplVsnprintf(s, n, fmt, ap);
|
||||
if (ret < 0)
|
||||
testingprivInternalError("encoding error in vsnprintf(); this likely means your call to testingTLogf() and the like is invalid");
|
||||
return ret;
|
||||
}
|
||||
|
||||
int testingprivSnprintf(char *s, size_t n, const char *format, ...)
|
||||
int testingprivSnprintf(char *s, size_t n, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start(ap, format);
|
||||
ret = testingprivVsnprintf(s, n, format, ap);
|
||||
va_start(ap, fmt);
|
||||
ret = testingprivVsnprintf(s, n, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ extern void testingprivInternalError(const char *fmt, ...);
|
|||
|
||||
#undef sharedbitsPrefix
|
||||
|
||||
extern int testingprivVsnprintf(char *s, size_t n, const char *format, va_list ap);
|
||||
extern int testingprivSnprintf(char *s, size_t n, const char *format, ...);
|
||||
extern int testingprivVsnprintf(char *s, size_t n, const char *fmt, va_list ap);
|
||||
extern int testingprivSnprintf(char *s, size_t n, const char *fmt, ...);
|
||||
extern char *testingprivStrdup(const char *s);
|
||||
extern char *testingprivVsmprintf(const char *fmt, va_list ap);
|
||||
extern char *testingprivSmprintf(const char *fmt, ...);
|
||||
|
|
Loading…
Reference in New Issue