snprintf_2.2/snprintf.h

Tue, 11 Mar 2003 20:01:42 +0100

author
tuomov
date
Tue, 11 Mar 2003 20:01:42 +0100
changeset 47
672e29bfda3c
parent 35
5a71d53d0228
permissions
-rw-r--r--

trunk: changeset 51
minor glitch

35
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
1 #ifndef _PORTABLE_SNPRINTF_H_
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
2 #define _PORTABLE_SNPRINTF_H_
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
3
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
4 #define PORTABLE_SNPRINTF_VERSION_MAJOR 2
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
5 #define PORTABLE_SNPRINTF_VERSION_MINOR 2
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
6
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
7 #ifdef HAVE_SNPRINTF
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
8 #include <stdio.h>
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
9 #else
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
10 extern int snprintf(char *, size_t, const char *, /*args*/ ...);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
11 extern int vsnprintf(char *, size_t, const char *, va_list);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
12 #endif
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
13
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
14 #if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
15 extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
16 extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
17 #define snprintf portable_snprintf
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
18 #define vsnprintf portable_vsnprintf
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
19 #endif
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
20
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
21 extern int asprintf (char **ptr, const char *fmt, /*args*/ ...);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
22 extern int vasprintf (char **ptr, const char *fmt, va_list ap);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
23 extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
24 extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
25
5a71d53d0228 trunk: changeset 38
tuomov
parents:
diff changeset
26 #endif

mercurial