1 /* 2 * declarations of tiny printf/err functions 3 * 4 * written by ITOH Yasufumi 5 * public domain 6 * 7 * $NetBSD: xprintf.h,v 1.3 2011/02/21 02:31:58 itohy Exp $ 8 */ 9 10 #include <sys/cdefs.h> 11 #ifdef __STDC__ 12 #include <stdarg.h> 13 #endif 14 15 size_t xvsnprintf(char *buf, size_t len, const char *fmt, va_list ap); 16 size_t xsnprintf(char *buf, size_t len, const char *fmt, ...); 17 size_t xvfdprintf(int fd, const char *fmt, va_list ap); 18 size_t xprintf(const char *fmt, ...); 19 size_t xerrprintf(const char *fmt, ...); 20 __dead void xerr(int eval, const char *fmt, ...) 21 __attribute__((noreturn)); 22 __dead void xerrx(int eval, const char *fmt, ...) 23 __attribute__((noreturn)); 24 void xwarn(const char *fmt, ...); 25 void xwarnx(const char *fmt, ...); 26