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