]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/addseverity.3
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3 / addseverity.3
1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" adapted glibc info page
4 .\"
5 .\" polished a little, aeb
6 .TH ADDSEVERITY 3 2002-08-07 "gnu" "Linux Programmer's Manual"
7 .SH NAME
8 addseverity \- introduce new severity classes
9 .SH SYNOPSIS
10 .nf
11 .sp
12 .B #define _SVID_SOURCE
13 .br
14 .B #include <fmtmsg.h>
15 .sp
16 .BI "int addseverity(int " severity ", const char *" s );
17 .sp
18 .fi
19 .SH DESCRIPTION
20 This function allows the introduction of new severity classes
21 which can be addressed by the
22 .I severity
23 parameter of the
24 .BR fmtmsg (3)
25 function. By default that latter function only knows how to
26 print messages for severity 0-4 (with strings (none), HALT,
27 ERROR, WARNING, INFO). This call attaches the given string
28 .I s
29 to the given value
30 .IR severity .
31 If
32 .I s
33 is NULL, the severity class with the numeric value
34 .I severity
35 is removed.
36 It is not possible to overwrite or remove one of the default
37 severity classes. The severity value must be nonnegative.
38 .SH "RETURN VALUE"
39 Upon success, the value
40 .B MM_OK
41 is returned. Upon error, the return value is
42 .BR MM_NOTOK .
43 Possible errors include: out of memory, attempt to remove a
44 nonexistent or default severity class.
45 .SH NOTE
46 New severity classes can also be added by setting the environment varible
47 .BR SEV_LEVEL .
48 .SH "CONFORMING TO"
49 This function is not specified in the X/Open Portability Guide
50 although the `fmtsmg' function is. It is available on System V
51 systems.
52 .SH "SEE ALSO"
53 .BR fmtmsg (3)