[En-Nut-Discussion] Is an snprintf and vsnprintf available?
Harald Kipp
harald.kipp at egnite.de
Wed Oct 11 13:25:27 CEST 2006
From some internal infos I know, that you are looking for
a simple port only, not the additional security. So, how
about simply ignoring the additional safety parameter:
int vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
return vsprintf(str, format, ap);
}
int snprintf(char *buffer, size_t size, CONST char *fmt, ...)
{
int rc;
va_list ap;
va_start(ap, fmt);
rc = vsnprintf(buffer, size, fmt, ap);
va_end(ap);
return rc;
}
Not secure, but will keep you going.
Harald
At 22:27 10.10.2006 +0200, you wrote:
>Hello,
>
>does anyone has already implemented snprintf and vsnprintf for Nut/OS?
>
>Best regards,
>
>Michael
More information about the En-Nut-Discussion
mailing list