search for: xvsnprintf

Displaying 3 results from an estimated 3 matches for "xvsnprintf".

Did you mean: vsnprintf
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...b/usr/dash/output.c index f62e7eab..1b20850a 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,6 @@ struct output *out1 = &output; struct output *out2 = &errout; -#ifndef USE_GLIBC_STDIO -static void __outstr(const char *, size_t, struct output *); -#endif static int xvsnprintf(char *, size_t, const char *, va_list); @@ -134,10 +131,14 @@ RESET { #endif -#ifndef USE_GLIBC_STDIO -static void -__outstr(const char *p, size_t len, struct output *dest) +void +outmem(const char *p, size_t len, struct output *dest) { +#ifdef USE_GLIBC_STDIO + INTOFF; + fwrite(p, 1, len...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...b/usr/dash/output.c index bb7c6ada..6618cc33 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,6 @@ struct output *out1 = &output; struct output *out2 = &errout; -#ifndef USE_GLIBC_STDIO -static void __outstr(const char *, size_t, struct output *); -#endif static int xvsnprintf(char *, size_t, const char *, va_list); @@ -134,10 +131,14 @@ RESET { #endif -#ifndef USE_GLIBC_STDIO -static void -__outstr(const char *p, size_t len, struct output *dest) +void +outmem(const char *p, size_t len, struct output *dest) { +#ifdef USE_GLIBC_STDIO + INTOFF; + fwrite(p, 1, len...
2020 Mar 28
0
[klibc:update-dash] dash: output: Fix fmtstr return value
...tput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/dash/output.c b/usr/dash/output.c index fb6b60ab..e9ee9b4d 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -286,7 +286,7 @@ fmtstr(char *outbuf, size_t length, const char *fmt, ...) va_start(ap, fmt); ret = xvsnprintf(outbuf, length, fmt, ap); va_end(ap); - return ret; + return ret > (int)length ? length : ret; }