]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/addseverity.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[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 .fi
18 .SH DESCRIPTION
19 This function allows the introduction of new severity classes
20 which can be addressed by the
21 .I severity
22 parameter of the
23 .BR fmtmsg (3)
24 function.
25 By default that latter function only knows how to
26 print messages for severity 0-4 (with strings (none), HALT,
27 ERROR, WARNING, INFO).
28 This call attaches the given string
29 .I s
30 to the given value
31 .IR severity .
32 If
33 .I s
34 is NULL, the severity class with the numeric value
35 .I severity
36 is removed.
37 It is not possible to overwrite or remove one of the default
38 severity classes.
39 The severity value must be nonnegative.
40 .SH "RETURN VALUE"
41 Upon success, the value
42 .B MM_OK
43 is returned.
44 Upon error, the return value is
45 .BR MM_NOTOK .
46 Possible errors include: out of memory, attempt to remove a
47 nonexistent or default severity class.
48 .SH NOTE
49 New severity classes can also be added by setting the environment variable
50 .BR SEV_LEVEL .
51 .SH "CONFORMING TO"
52 This function is not specified in the X/Open Portability Guide
53 although the
54 .BR fmtmsg ()
55 function is.
56 It is available on System V
57 systems.
58 .SH "SEE ALSO"
59 .BR fmtmsg (3),
60 .BR feature_test_macros (7)