1 /* 2 * This file is part of the XForms library package. 3 * 4 * XForms is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as 6 * published by the Free Software Foundation; either version 2.1, or 7 * (at your option) any later version. 8 * 9 * XForms is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with XForms. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 19 /** 20 * \file flsnprintf.h 21 */ 22 23 #ifndef FL_SNPRINTF_H 24 #define FL_SNPRINTF_H 25 26 #include <stdio.h> 27 28 #ifdef HAVE_SNPRINTF 29 30 #ifndef HAVE_DECL_SNPRINTF 31 int snprintf( char *, 32 size_t, 33 const char *, 34 ...); 35 #endif 36 37 #ifndef HAVE_DECL_VSNPRINTF 38 int vsnprintf( char *, 39 size_t, 40 const char *, 41 va_list); 42 #endif 43 44 #define fli_snprintf snprintf 45 #define fli_vsnprintf vsnprintf 46 47 #else 48 49 int fli_portable_snprintf( char *, 50 size_t, 51 const char *, 52 ... ); 53 54 int fli_portable_vsnprintf( char *, 55 size_t, 56 const char *, 57 va_list ); 58 59 #define fli_snprintf fli_portable_snprintf 60 #define fli_vsnprintf fli_portable_vsnprintf 61 62 #endif /* HAVE_SNPRINTF */ 63 64 #endif /* NOT FL_SNPRINTF_H */ 65 66 67 /* 68 * Local variables: 69 * tab-width: 4 70 * indent-tabs-mode: nil 71 * End: 72 */ 73