xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/msg.h (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1 /*	$NetBSD: msg.h,v 1.2 2017/02/14 01:16:49 christos Exp $	*/
2 
3 #ifndef _MSG_H_INCLUDED_
4 #define _MSG_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	msg 3h
9 /* SUMMARY
10 /*	diagnostics interface
11 /* SYNOPSIS
12 /*	#include "msg.h"
13 /* DESCRIPTION
14 /*	.nf
15 
16 /*
17  * System library.
18  */
19 #include <stdarg.h>
20 #include <time.h>
21 
22 /*
23  * External interface.
24  */
25 typedef void (*MSG_CLEANUP_FN) (void);
26 
27 extern int msg_verbose;
28 
29 extern void PRINTFLIKE(1, 2) msg_info(const char *,...);
30 extern void PRINTFLIKE(1, 2) msg_warn(const char *,...);
31 extern void PRINTFLIKE(1, 2) msg_error(const char *,...);
32 extern NORETURN PRINTFLIKE(1, 2) msg_fatal(const char *,...);
33 extern NORETURN PRINTFLIKE(2, 3) msg_fatal_status(int, const char *,...);
34 extern NORETURN PRINTFLIKE(1, 2) msg_panic(const char *,...);
35 
36 extern void vmsg_info(const char *, va_list);
37 extern void vmsg_warn(const char *, va_list);
38 extern void vmsg_error(const char *, va_list);
39 extern NORETURN vmsg_fatal(const char *, va_list);
40 extern NORETURN vmsg_fatal_status(int, const char *, va_list);
41 extern NORETURN vmsg_panic(const char *, va_list);
42 
43 extern int msg_error_limit(int);
44 extern void msg_error_clear(void);
45 extern MSG_CLEANUP_FN msg_cleanup(MSG_CLEANUP_FN);
46 
47 extern void PRINTFLIKE(4, 5) msg_rate_delay(time_t *, int,
48 	              void PRINTFPTRLIKE(1, 2) (*log_fn) (const char *,...),
49 					            const char *,...);
50 
51 /* LICENSE
52 /* .ad
53 /* .fi
54 /*	The Secure Mailer license must be distributed with this software.
55 /* AUTHOR(S)
56 /*	Wietse Venema
57 /*	IBM T.J. Watson Research
58 /*	P.O. Box 704
59 /*	Yorktown Heights, NY 10598, USA
60 /*--*/
61 
62 #endif
63