| * This file has no copyright assigned and is placed in the Public Domain. |
| * This file is part of the mingw-w64 runtime package. |
| * No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| int __cdecl __ms_vsnprintf (char *s,size_t n,const char *format,va_list arg) |
| /* _vsnprintf() does not work with zero length buffer |
| * so count number of character by _vscprintf() call */ |
| return _vscprintf(format, arg); |
| retval = _vsnprintf(s, n, format, arg); |
| /* _vsnprintf() does not fill trailing null byte if there is not place for it */ |
| if (retval < 0 || (size_t)retval == n) |
| /* _vsnprintf() returns negative number if buffer is too small |
| * so count number of character by _vscprintf() call */ |
| retval = _vscprintf(format, arg); |