xref: /netbsd-src/include/err.h (revision 4dd5a4c03fd7fbd70f9fbb3a3ebe222fdf37559a)
1*4dd5a4c0Suwe /*	$NetBSD: err.h,v 1.18 2022/01/06 00:16:47 uwe Exp $	*/
24d2cbfceScgd 
3bb10974cSglass /*-
4012f3316Scgd  * Copyright (c) 1993
5012f3316Scgd  *	The Regents of the University of California.  All rights reserved.
6bb10974cSglass  *
7bb10974cSglass  * Redistribution and use in source and binary forms, with or without
8bb10974cSglass  * modification, are permitted provided that the following conditions
9bb10974cSglass  * are met:
10bb10974cSglass  * 1. Redistributions of source code must retain the above copyright
11bb10974cSglass  *    notice, this list of conditions and the following disclaimer.
12bb10974cSglass  * 2. Redistributions in binary form must reproduce the above copyright
13bb10974cSglass  *    notice, this list of conditions and the following disclaimer in the
14bb10974cSglass  *    documentation and/or other materials provided with the distribution.
15039cc956Sagc  * 3. Neither the name of the University nor the names of its contributors
16bb10974cSglass  *    may be used to endorse or promote products derived from this software
17bb10974cSglass  *    without specific prior written permission.
18bb10974cSglass  *
19bb10974cSglass  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20bb10974cSglass  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21bb10974cSglass  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22bb10974cSglass  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23bb10974cSglass  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24bb10974cSglass  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25bb10974cSglass  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26bb10974cSglass  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27bb10974cSglass  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28bb10974cSglass  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29bb10974cSglass  * SUCH DAMAGE.
30bb10974cSglass  *
314d2cbfceScgd  *	@(#)err.h	8.1 (Berkeley) 6/2/93
32bb10974cSglass  */
33bb10974cSglass 
34bb10974cSglass #ifndef _ERR_H_
35bb10974cSglass #define	_ERR_H_
36bb10974cSglass 
37bb10974cSglass #include <sys/cdefs.h>
383eb244d8Sjoerg #include <stdarg.h>
39bb10974cSglass 
40bb10974cSglass __BEGIN_DECLS
4119b7469aSperry __dead void	err(int, const char *, ...)
42*4dd5a4c0Suwe 		     __printflike(2, 3);
433eb244d8Sjoerg __dead void	verr(int, const char *, va_list)
44*4dd5a4c0Suwe 		    __printflike(2, 0);
4519b7469aSperry __dead void	errx(int, const char *, ...)
46*4dd5a4c0Suwe 		     __printflike(2, 3);
473eb244d8Sjoerg __dead void	verrx(int, const char *, va_list)
48*4dd5a4c0Suwe 		    __printflike(2, 0);
491102b348Schristos __dead void	errc(int, int, const char *, ...)
50*4dd5a4c0Suwe 		     __printflike(3, 4);
511102b348Schristos __dead void	verrc(int, int, const char *, va_list)
52*4dd5a4c0Suwe 		    __printflike(3, 0);
5319b7469aSperry void		warn(const char *, ...)
548a601553Sjoerg 		    __printflike(1, 2);
553eb244d8Sjoerg void		vwarn(const char *, va_list)
568a601553Sjoerg 		    __printflike(1, 0);
5719b7469aSperry void		warnx(const char *, ...)
588a601553Sjoerg 		    __printflike(1, 2);
593eb244d8Sjoerg void		vwarnx(const char *, va_list)
608a601553Sjoerg 		    __printflike(1, 0);
611102b348Schristos void		warnc(int, const char *, ...)
621102b348Schristos 		    __printflike(2, 3);
631102b348Schristos void		vwarnc(int, const char *, va_list)
641102b348Schristos 		    __printflike(2, 0);
65bb10974cSglass __END_DECLS
66bb10974cSglass 
67bb10974cSglass #endif /* !_ERR_H_ */
68