1/*	$NetBSD: msg_output.h,v 1.3 2020/03/18 19:05:21 christos Exp $	*/
2
3#ifndef _MSG_OUTPUT_FN_
4#define _MSG_OUTPUT_FN_
5
6/*++
7/* NAME
8/*	msg_output 3h
9/* SUMMARY
10/*	diagnostics output management
11/* SYNOPSIS
12/*	#include <msg_output.h>
13/* DESCRIPTION
14
15 /*
16  * System library.
17  */
18#include <stdarg.h>
19
20 /*
21  * External interface. Severity levels are documented to be monotonically
22  * increasing from 0 up to MSG_LAST.
23  */
24typedef void (*MSG_OUTPUT_FN) (int, const char *);
25extern void msg_output(MSG_OUTPUT_FN);
26extern void PRINTFLIKE(2, 3) msg_printf(int, const char *,...);
27extern void msg_vprintf(int, const char *, va_list);
28
29#define MSG_INFO	0		/* informative */
30#define	MSG_WARN	1		/* warning (non-fatal) */
31#define MSG_ERROR	2		/* error (fatal) */
32#define MSG_FATAL	3		/* software error (fatal) */
33#define MSG_PANIC	4		/* software error (fatal) */
34
35#define MSG_LAST	4		/* highest-numbered severity level */
36
37/* LICENSE
38/* .ad
39/* .fi
40/*	The Secure Mailer license must be distributed with this software.
41/* AUTHOR(S)
42/*	Wietse Venema
43/*	IBM T.J. Watson Research
44/*	P.O. Box 704
45/*	Yorktown Heights, NY 10598, USA
46/*
47/*	Wietse Venema
48/*	Google, Inc.
49/*	111 8th Avenue
50/*	New York, NY 10011, USA
51/*--*/
52
53#endif
54