Rename vfnprintf to vuprintf (u stands for user for the user callback and data passed to it) to avoid confusion with file and buffer size related functions from the printf-family, and add a comment to its declaration.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23503 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-11-03 21:20:09 +00:00
parent 310346ebcc
commit 1ddb91ad36
3 changed files with 6 additions and 3 deletions

View File

@ -292,7 +292,7 @@ int fdprintf(int fd, const char *fmt, ...)
return fpr.bytes; /* return 0 on error */
}
int vfnprintf(int (*push)(void *userp, unsigned char data), void *userp, const char *fmt, va_list ap)
int vuprintf(int (*push)(void *userp, unsigned char data), void *userp, const char *fmt, va_list ap)
{
return format(push, userp, fmt, ap);
}

View File

@ -32,6 +32,9 @@ int snprintf (char *buf, size_t size, const char *fmt, ...)
int vsnprintf (char *buf, int size, const char *fmt, va_list ap);
int fdprintf (int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
int vfnprintf(int (*push)(void *userp, unsigned char data), void *userp, const char *fmt, va_list ap);
/* callback function is called for every output character (byte) with userp and
* should return 0 when ch is a char other than '\0' that should stop printing */
int vuprintf(int (*push)(void *userp, unsigned char data),
void *userp, const char *fmt, va_list ap);
#endif /* __SPRINTF_H__ */

View File

@ -214,7 +214,7 @@ void _logf(const char *fmt, ...)
DEBUGF("%s\n", buf);
#endif
vfnprintf(logf_push, NULL, fmt, ap);
vuprintf(logf_push, NULL, fmt, ap);
va_end(ap);
/* add trailing zero */