34 #define _vfprintf_r _vfiprintf_r
42 _DEFUN (_snprintf_r, (ptr, str, size, fmt),
struct _reent *ptr _AND
char *str _AND
size_t size _AND _CONST
char *fmt _DOTS)
44 _snprintf_r (ptr, str, size, fmt, va_alist)
58 ptr->_errno = EOVERFLOW;
62 f._flags = __SWR | __SSTR;
63 f._bf._base = f._p = (
unsigned char *) str;
64 f._bf._size = f._w = (size > 0 ? size - 1 : 0);
71 ret = _vfprintf_r (ptr, &f, fmt, ap);
74 ptr->_errno = EOVERFLOW;
84 _DEFUN (snprintf, (str, size, fmt),
char *str _AND
size_t size _AND _CONST
char *fmt _DOTS)
86 snprintf (str, size, fmt, va_alist)
97 struct _reent *ptr = _REENT;
101 ptr->_errno = EOVERFLOW;
105 f._flags = __SWR | __SSTR;
106 f._bf._base = f._p = (
unsigned char *) str;
107 f._bf._size = f._w = (size > 0 ? size - 1 : 0);
114 ret = _vfprintf_r (ptr, &f, fmt, ap);
117 ptr->_errno = EOVERFLOW;