From 8195aff714f2ea5d680a5129a1d54af388e90355 Mon Sep 17 00:00:00 2001 From: Matthew Green Date: Sun, 3 Feb 2002 09:24:18 +0000 Subject: * implement a new `struct _reent' that is significantly smaller. use this if _REENT_SMALL is defined in config.h. define this for xstormy16. --- newlib/libc/stdio/printf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'newlib/libc/stdio/printf.c') diff --git a/newlib/libc/stdio/printf.c b/newlib/libc/stdio/printf.c index 81fb8a2cb..e8ec5b475 100644 --- a/newlib/libc/stdio/printf.c +++ b/newlib/libc/stdio/printf.c @@ -2,6 +2,8 @@ #include <_ansi.h> #include +#include "local.h" + #ifdef _HAVE_STDC #include @@ -12,6 +14,7 @@ _printf_r (struct _reent *ptr, const char *fmt, ...) int ret; va_list ap; + _REENT_SMALL_CHECK_INIT(_stdout_r (ptr)); va_start (ap, fmt); ret = _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); va_end (ap); @@ -31,6 +34,7 @@ _printf_r (ptr, fmt, va_alist) int ret; va_list ap; + _REENT_SMALL_CHECK_INIT(_stdout_r (ptr)); va_start (ap); ret = _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); va_end (ap); @@ -52,6 +56,7 @@ printf (const char *fmt, ...) int ret; va_list ap; + _REENT_SMALL_CHECK_INIT(_stdout_r (_REENT)); va_start (ap, fmt); _stdout_r (_REENT)->_data = _REENT; ret = vfprintf (_stdout_r (_REENT), fmt, ap); @@ -71,6 +76,7 @@ printf (fmt, va_alist) int ret; va_list ap; + _REENT_SMALL_CHECK_INIT(_stdout_r (_REENT)); va_start (ap); _stdout_r (_REENT)->_data = _REENT; ret = vfprintf (_stdout_r (_REENT), fmt, ap); -- cgit v1.2.3