Update.
[glibc.git] / stdlib / fmtmsg.h
blobb87644f0ee88c4d8b33d85c18d224bbec262bf35
1 /* Message display handling.
2 Copyright (C) 1997 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #ifndef __FMTMSG_H
21 #define __FMTMSG_H 1
23 #include <features.h>
25 #define __need_NULL
26 #include <stddef.h>
29 __BEGIN_DECLS
31 /* Values to control `fmtmsg' function. */
32 enum
34 MM_HARD = 0x001, /* Source of the condition is hardware. */
35 #define MM_HARD MM_HARD
36 MM_SOFT = 0x002, /* Source of the condition is software. */
37 #define MM_SOFT MM_SOFT
38 MM_FIRM = 0x004, /* Source of the condition is firmware. */
39 #define MM_FIRM MM_FIRM
40 MM_APPL = 0x008, /* Condition detected by application. */
41 #define MM_APPL MM_APPL
42 MM_UTIL = 0x010, /* Condition detected by utility. */
43 #define MM_UTIL MM_UTIL
44 MM_OPSYS = 0x020, /* Condition detected by operating system. */
45 #define MM_OPSYS MM_OPSYS
46 MM_RECOVER = 0x040, /* Recoverable error. */
47 #define MM_RECOVER MM_RECOVER
48 MM_NRECOV = 0x080, /* Non-recoverable error. */
49 #define MM_NRECOV MM_NRECOV
50 MM_PRINT = 0x100, /* Display message in standard error. */
51 #define MM_PRINT MM_PRINT
52 MM_CONSOLE = 0x200 /* Display message on system console. */
53 #define MM_CONSOLE MM_CONSOLE
56 /* Values to be for SEVERITY parameter of `fmtmsg'. */
57 enum
59 MM_NOSEV = 0, /* No severity level provided for the message. */
60 #define MM_NOSEV MM_NOSEV
61 MM_HALT, /* Error causing application to halt. */
62 #define MM_HALT MM_HALT
63 MM_ERROR, /* Application has encountered a non-fatal fault. */
64 #define MM_ERROR MM_ERROR
65 MM_WARNING, /* Application has detected unusual non-error
66 condition. */
67 #define MM_WARNING MM_WARNING
68 MM_INFO /* Informative message. */
69 #define MM_INFO MM_INFO
73 /* Macros which can be used as null values for the arguments of `fmtmsg'. */
74 #define MM_NULLLBL NULL
75 #define MM_NULLSEV 0
76 #define MM_NULLMC ((long int) 0)
77 #define MM_NULLTXT NULL
78 #define MM_NULLACT NULL
79 #define MM_NULLTAG NULL
82 /* Possible return values of `fmtmsg'. */
83 enum
85 MM_NOTOK = -1,
86 #define MM_NOTOK MM_NOTOK
87 MM_OK = 0,
88 #define MM_OK MM_OK
89 MM_NOMSG = 1,
90 #define MM_NOMSG MM_NOMSG
91 MM_NOCON = 4
92 #define MM_NOCON MM_NOCON
96 /* Print message with given CLASSIFICATION, LABEL, SEVERITY, TEXT, ACTION
97 and TAG to console or standard error. */
98 extern int fmtmsg __P ((long int __classification, __const char *__label,
99 int __severity, __const char *__text,
100 __const char *__action, __const char *__tag));
102 #ifdef __USE_SVID
103 /* Add or remove severity level. */
104 extern int addseverity __P ((int __severity, __const char *__string));
105 #endif
107 __END_DECLS
109 #endif /* fmtmsg.h */