]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/addseverity.3
namespaces.7: ffix
[thirdparty/man-pages.git] / man3 / addseverity.3
CommitLineData
fea681da 1.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2297bf0e 2.\"
38f20bb9 3.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
b18188c5 4.\" Distributed under GPL
38f20bb9 5.\" %%%LICENSE_END
fea681da
MK
6.\" adapted glibc info page
7.\"
8.\" polished a little, aeb
97986708 9.TH ADDSEVERITY 3 2016-03-15 "GNU" "Linux Programmer's Manual"
fea681da
MK
10.SH NAME
11addseverity \- introduce new severity classes
12.SH SYNOPSIS
13.nf
14.sp
fea681da
MK
15.B #include <fmtmsg.h>
16.sp
17.BI "int addseverity(int " severity ", const char *" s );
fea681da 18.fi
cc4615cc
MK
19.sp
20.in -4n
21Feature Test Macro Requirements for glibc (see
22.BR feature_test_macros (7)):
23.in
24.sp
25.BR addseverity ():
51c612fb
MK
26 Since glibc 2.19:
27 _DEFAULT_SOURCE
28 Glibc 2.19 and earlier:
29 _SVID_SOURCE
fea681da
MK
30.SH DESCRIPTION
31This function allows the introduction of new severity classes
32which can be addressed by the
33.I severity
c4bb193f 34argument of the
fea681da 35.BR fmtmsg (3)
c13182ef 36function.
fb8d1da0 37By default, that function knows only how to
fea681da 38print messages for severity 0-4 (with strings (none), HALT,
c13182ef
MK
39ERROR, WARNING, INFO).
40This call attaches the given string
fea681da
MK
41.I s
42to the given value
43.IR severity .
44If
45.I s
46is NULL, the severity class with the numeric value
47.I severity
48is removed.
49It is not possible to overwrite or remove one of the default
c13182ef 50severity classes.
2fda57bd 51The severity value must be nonnegative.
47297adb 52.SH RETURN VALUE
fea681da
MK
53Upon success, the value
54.B MM_OK
c13182ef
MK
55is returned.
56Upon error, the return value is
fea681da
MK
57.BR MM_NOTOK .
58Possible errors include: out of memory, attempt to remove a
59nonexistent or default severity class.
c343e74c
MK
60.SH VERSIONS
61.BR addseverity ()
62is provided in glibc since version 2.1.
fae930d4
MS
63.SH ATTRIBUTES
64For an explanation of the terms used in this section, see
65.BR attributes (7).
66.TS
67allbox;
68lb lb lb
69l l l.
70Interface Attribute Value
71T{
72.BR addseverity ()
73T} Thread safety MT-Safe
74.TE
47297adb 75.SH CONFORMING TO
fea681da 76This function is not specified in the X/Open Portability Guide
c13182ef 77although the
fb186734 78.BR fmtmsg (3)
c13182ef
MK
79function is.
80It is available on System V
fea681da 81systems.
2b2581ee
MK
82.SH NOTES
83New severity classes can also be added by setting the environment variable
84.BR SEV_LEVEL .
47297adb 85.SH SEE ALSO
cc4615cc 86.BR fmtmsg (3)