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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO rename all msgs to fmt
|
bool uiprivInitReturnErrorf(uiInitError *err, const char *fmt, ...)
|
||||||
bool uiprivInitReturnErrorf(uiInitError *err, const char *msg, ...)
|
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, msg);
|
va_start(ap, fmt);
|
||||||
n = uiprivVsnprintf(err->Message, 256, msg, ap);
|
n = uiprivVsnprintf(err->Message, 256, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
uiprivInternalError("encoding error returning initialization error; this means something is very very wrong with libui itself");
|
uiprivInternalError("encoding error returning initialization error; this means something is very very wrong with libui itself");
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern "C" {
|
||||||
|
|
||||||
// main.c
|
// main.c
|
||||||
extern bool uiprivSysInit(void *options, uiInitError *err);
|
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 void uiprivSysQueueMain(void (*f)(void *data), void *data);
|
||||||
extern bool uiprivCheckInitializedAndThreadImpl(const char *func);
|
extern bool uiprivCheckInitializedAndThreadImpl(const char *func);
|
||||||
#define uiprivCheckInitializedAndThread() uiprivCheckInitializedAndThreadImpl(uiprivFunc)
|
#define uiprivCheckInitializedAndThread() uiprivCheckInitializedAndThreadImpl(uiprivFunc)
|
||||||
|
|
|
@ -188,7 +188,7 @@ void testingprivTLogfFull(testingT *t, const char *file, long line, const char *
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, fmt);
|
||||||
testingprivTLogvfFull(t, file, line, format, ap);
|
testingprivTLogvfFull(t, file, line, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,23 +31,23 @@ void testingprivInternalError(const char *fmt, ...)
|
||||||
#undef sharedbitsStatic
|
#undef sharedbitsStatic
|
||||||
#undef sharedbitsPrefix
|
#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;
|
int ret;
|
||||||
|
|
||||||
ret = testingprivImplVsnprintf(s, n, format, ap);
|
ret = testingprivImplVsnprintf(s, n, fmt, ap);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
testingprivInternalError("encoding error in vsnprintf(); this likely means your call to testingTLogf() and the like is invalid");
|
testingprivInternalError("encoding error in vsnprintf(); this likely means your call to testingTLogf() and the like is invalid");
|
||||||
return ret;
|
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;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, fmt);
|
||||||
ret = testingprivVsnprintf(s, n, format, ap);
|
ret = testingprivVsnprintf(s, n, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@ extern void testingprivInternalError(const char *fmt, ...);
|
||||||
|
|
||||||
#undef sharedbitsPrefix
|
#undef sharedbitsPrefix
|
||||||
|
|
||||||
extern int testingprivVsnprintf(char *s, size_t n, const char *format, va_list ap);
|
extern int testingprivVsnprintf(char *s, size_t n, const char *fmt, va_list ap);
|
||||||
extern int testingprivSnprintf(char *s, size_t n, const char *format, ...);
|
extern int testingprivSnprintf(char *s, size_t n, const char *fmt, ...);
|
||||||
extern char *testingprivStrdup(const char *s);
|
extern char *testingprivStrdup(const char *s);
|
||||||
extern char *testingprivVsmprintf(const char *fmt, va_list ap);
|
extern char *testingprivVsmprintf(const char *fmt, va_list ap);
|
||||||
extern char *testingprivSmprintf(const char *fmt, ...);
|
extern char *testingprivSmprintf(const char *fmt, ...);
|
||||||
|
|
Loading…
Reference in New Issue