Subversion Repositories planix.SVN

Rev

Rev 46 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 46 Rev 55
Line 39... Line 39...
39
 
39
 
40
#pragma src "/sys/src/ape/lib/bsd"
40
#pragma src "/sys/src/ape/lib/bsd"
41
#pragma lib "/$M/lib/ape/libbsd.a"
41
#pragma lib "/$M/lib/ape/libbsd.a"
42
 
42
 
43
 
43
 
-
 
44
#include <stdarg.h>
44
 
45
 
45
 
46
 
46
 
-
 
47
/*
47
/*
48
 * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
48
 * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
49
 * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
49
 * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
50
 * of them here we may collide with the utility's includes.  It's unreasonable
50
 * of them here we may collide with the utility's includes.  It's unreasonable
51
 * for utilities to have to include one of them to include err.h, so we get
51
 * for utilities to have to include one of them to include err.h, so we get
52
 * __va_list from <sys/_types.h> and use it.
52
 * __va_list from <sys/_types.h> and use it.
53
 */
53
 */
54
#include <sys/cdefs.h>
-
 
55
#include <sys/_types.h>
54
//#include <sys/_types.h>
56
 
55
 
-
 
56
void	err(int, const char *, ...);
-
 
57
void	verr(int, const char *, va_list);
-
 
58
void	errc(int, int, const char *, ...);
-
 
59
 
-
 
60
void	verrc(int, int, const char *, va_list);
-
 
61
//void    verrc(int eval, int code, const char *fmt, va_list ap);
-
 
62
 
-
 
63
void	errx(int, const char *, ...);
-
 
64
void	verrx(int, const char *, va_list);
-
 
65
void	warn(const char *, ...);
-
 
66
void	vwarn(const char *, va_list);
57
/*
67
/*
58
void	err(int, const char *, ...) __dead2 __printf0like(2, 3);
-
 
59
void	verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
-
 
60
void	errc(int, int, const char *, ...) __dead2 __printf0like(3, 4);
-
 
61
void	verrc(int, int, const char *, __va_list) __dead2
-
 
62
	    __printf0like(3, 0);
-
 
63
void	errx(int, const char *, ...) __dead2 __printf0like(2, 3);
-
 
64
void	verrx(int, const char *, __va_list) __dead2 __printf0like(2, 0);
-
 
65
void	warn(const char *, ...) __printf0like(1, 2);
-
 
66
void	vwarn(const char *, __va_list) __printf0like(1, 0);
-
 
67
void	warnc(int, const char *, ...) __printf0like(2, 3);
68
void	warnc(int, const char *, ...) __printf0like(2, 3);
-
 
69
*/
68
void	vwarnc(int, const char *, __va_list) __printf0like(2, 0);
70
void	vwarnc(int, const char *, va_list);
-
 
71
/*
69
void	warnx(const char *, ...) __printflike(1, 2);
72
void	warnx(const char *, ...) __printflike(1, 2);
-
 
73
*/
70
void	vwarnx(const char *, __va_list) __printf0like(1, 0);
74
void	vwarnx(const char *, va_list);
-
 
75
/*
71
void	err_set_file(void *);
76
void	err_set_file(void *);
72
void	err_set_exit(void (* _Nullable)(int));
77
void	err_set_exit(void (* _Nullable)(int));
73
*/
78
*/
74
 
79
 
75
#endif /* __ERR_H_ */
80
#endif /* __ERR_H_ */