Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _CPRINTF_H
- #define _CPRINTF_H
- #include <stdio.h>
- #include <stdarg.h>
- #if __STDC_VERSION__ < 199901L
- /* Prior C99 */
- int cprintf(const char *format, ...);
- int cfprintf(FILE *stream, const char *format, ...);
- int csprintf(char *buffer, const char *format, ...);
- int cvprintf(const char *format, va_list vlist);
- int cvfprintf(FILE *stream, const char *format, va_list vlist);
- int cvsprintf(char *buffer, const char *format, va_list vlist);
- #else
- /* Since C99 */
- int cprintf(const char *restrict format, ...);
- int cfprintf(FILE *restrict stream, const char *restrict format, ...);
- int csprintf(char *restrict buffer, const char *restrict format, ...);
- int csnprintf(char *restrict buffer, int bufsz, const char *restrict format, ...);
- int cvprintf(const char *restrict format, va_list vlist);
- int cvfprintf(FILE *restrict stream, const char *restrict format, va_list vlist);
- int cvsprintf(char *restrict buffer, const char *restrict format, va_list vlist);
- int cvsnprintf(char *restrict buffer, int bufsz, const char *restrict format, va_list vlist);
- #endif
- #if __STDC_VERSION__ >= 201112L
- /* Since C11 */
- #if defined __STDC_LIB_EXT1__ && __STDC_WANT_LIB_EXT1__ == 1
- /* But only if Library Extension 1 available and desired */
- int cprintf_s(const char *restrict format, ...);
- int cfprintf_s(FILE *restrict stream, const char *restrict format, ...);
- int csprintf_s(char *restrict buffer, rsize_t bufsz, const char *restrict format, ...);
- int csnprintf_s(char *restrict buffer, rsize_t bufsz, const char *restrict format, ...);
- int cvprintf_s(const char *restrict format, va_list vlist);
- int cvfprintf_s(FILE *restrict stream, const char *restrict format, va_list vlist);
- int cvsprintf_s(char *restrict buffer, rsize_t bufsz, const char *restrict format, va_list vlist);
- int cvsnprintf_s(char *restrict buffer, rsize_t bufsz, const char *restrict format, va_list vlist);
- #endif
- #endif
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement