Use system vsnprintf when possible, saves 2kb lib size.
Currently with Linux guards, as the function seems to be broken in Windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10229 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f44d3fe01c
commit
3a5f3f1820
@ -28,6 +28,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
|
||||
#if defined(HAVE_VSNPRINTF) && defined(__linux__)
|
||||
return vsnprintf(buffer, bufsize, format, ap);
|
||||
#else
|
||||
char *bufptr, /* Pointer to position in buffer */
|
||||
*bufend, /* Pointer to end of buffer */
|
||||
sign, /* Sign of format width */
|
||||
@ -251,6 +254,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
|
||||
if (bufptr) *bufptr = '\0';
|
||||
|
||||
return (bytes);
|
||||
#endif //HAVE_VSNPRINTF
|
||||
}
|
||||
|
||||
int fl_snprintf(char* str, size_t size, const char* fmt, ...) {
|
||||
|
Loading…
Reference in New Issue
Block a user