diff options
-rw-r--r-- | newlib/ChangeLog | 11 | ||||
-rw-r--r-- | newlib/libc/stdio/vprintf.c | 15 | ||||
-rw-r--r-- | newlib/libc/stdio/vsnprintf.c | 24 | ||||
-rw-r--r-- | newlib/libc/stdio/vsprintf.c | 20 |
4 files changed, 45 insertions, 25 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 07e2f03b1..49b3ed445 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,14 @@ +2001-04-24 Charles Wilson <cwilson@ece.gatech.edu + + * libc/stdio/vprintf.c (vprintf): fix signature to use _DEFUN + * libc/stdio/vprintf.c (_vprintf_r): new function + * libc/stdio/vsnprintf.c (vsnprintf): fix signature to use _DEFUN + * libc/stdio/vsnprintf.c (_vsnprintf_r): fix signature to use + _DEFUN, and call _vfprintf_r, not vfprintf. + * libc/stdio/vsprintf.c (vsprintf.c): fix signature to use _DEFUN + * libc/stdio/vsprintf.c (_vsprintf_r): fix signature to use + _DEFUN, and call _vfprintf_r, not vfprintf. + 2001-04-22 Earnie Boyd <earnie@users.sourceforge.net> * libc/include/sys/unistd.h [X_OK]: Use better protection against diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c index c270141f0..f913bc097 100644 --- a/newlib/libc/stdio/vprintf.c +++ b/newlib/libc/stdio/vprintf.c @@ -27,9 +27,18 @@ #endif int -vprintf (fmt, ap) - char _CONST *fmt; - va_list ap; +_DEFUN (vprintf, (fmt, ap), + _CONST char *fmt _AND + va_list ap) { return vfprintf (stdout, fmt, ap); } + +int +_DEFUN (_vprintf_r, (ptr, fmt, ap), + struct _reent *ptr _AND + _CONST char *fmt _AND + va_list ap) +{ + return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); +} diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c index 5ca0ff27b..4e9c283bb 100644 --- a/newlib/libc/stdio/vsnprintf.c +++ b/newlib/libc/stdio/vsnprintf.c @@ -34,11 +34,11 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #endif int -vsnprintf (str, size, fmt, ap) - char *str; - size_t size; - char _CONST *fmt; - va_list ap; +_DEFUN (vsnprintf, (str, size, fmt, ap), + char *str _AND + size_t size _AND + _CONST char *fmt _AND + va_list ap) { int ret; FILE f; @@ -54,12 +54,12 @@ vsnprintf (str, size, fmt, ap) } int -vsnprintf_r (ptr, str, size, fmt, ap) - struct _reent *ptr; - char *str; - size_t size; - char _CONST *fmt; - va_list ap; +_DEFUN (_vsnprintf_r, (ptr, str, size, fmt, ap), + struct _reent *ptr _AND + char *str _AND + size_t size _AND + _CONST char *fmt _AND + va_list ap) { int ret; FILE f; @@ -68,7 +68,7 @@ vsnprintf_r (ptr, str, size, fmt, ap) f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = (size > 0 ? size - 1 : 0); f._data = ptr; - ret = vfprintf (&f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); if (size > 0) *f._p = 0; return ret; diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c index 416c184e8..b440ac506 100644 --- a/newlib/libc/stdio/vsprintf.c +++ b/newlib/libc/stdio/vsprintf.c @@ -32,10 +32,10 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #endif int -vsprintf (str, fmt, ap) - char *str; - char _CONST *fmt; - va_list ap; +_DEFUN (vsprintf, (str, fmt, ap), + char *str _AND + _CONST char *fmt _AND + va_list ap) { int ret; FILE f; @@ -50,11 +50,11 @@ vsprintf (str, fmt, ap) } int -vsprintf_r (ptr, str, fmt, ap) - struct _reent *ptr; - char *str; - char _CONST *fmt; - va_list ap; +_DEFUN (_vsprintf_r, (ptr, str, fmt, ap), + struct _reent *ptr _AND + char *str _AND + _CONST char *fmt _AND + va_list ap) { int ret; FILE f; @@ -63,7 +63,7 @@ vsprintf_r (ptr, str, fmt, ap) f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = INT_MAX; f._data = ptr; - ret = vfprintf (&f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); *f._p = 0; return ret; } |