nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 #ifndef SNPRINTF_H
2 #define SNPRINTF_H
3  
4 /* ===================================================================
5 * snprintf.h
6 *
7 * This is from
8 * W. Richard Stevens, 'UNIX Network Programming', Vol 1, 2nd Edition,
9 * Prentice Hall, 1998.
10 *
11 * Mark Gates <mgates@nlanr.net>
12 * July 1998
13 *
14 * to use this prototype, make sure HAVE_SNPRINTF is not defined
15 *
16 * =================================================================== */
17  
18 /*
19 * Throughout the book I use snprintf() because it's safer than sprintf().
20 * But as of the time of this writing, not all systems provide this
21 * function. The function below should only be built on those systems
22 * that do not provide a real snprintf().
23 * The function below just acts like sprintf(); it is not safe, but it
24 * tries to detect overflow.
25 */
26  
27 #ifndef HAVE_SNPRINTF
28  
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32  
33 int snprintf(char *buf, size_t size, const char *fmt, ...);
34  
35 #ifdef __cplusplus
36 } /* end extern "C" */
37 #endif
38  
39 #endif /* HAVE_SNPRINTF */
40 #endif /* SNPRINTF_H */