]>
Commit | Line | Data |
---|---|---|
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 |
11 | addseverity \- introduce new severity classes | |
12 | .SH SYNOPSIS | |
13 | .nf | |
68e4db0a | 14 | .PP |
fea681da | 15 | .B #include <fmtmsg.h> |
68e4db0a | 16 | .PP |
fea681da | 17 | .BI "int addseverity(int " severity ", const char *" s ); |
fea681da | 18 | .fi |
68e4db0a | 19 | .PP |
cc4615cc MK |
20 | .in -4n |
21 | Feature Test Macro Requirements for glibc (see | |
22 | .BR feature_test_macros (7)): | |
23 | .in | |
68e4db0a | 24 | .PP |
cc4615cc | 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 |
31 | This function allows the introduction of new severity classes | |
32 | which can be addressed by the | |
33 | .I severity | |
c4bb193f | 34 | argument of the |
fea681da | 35 | .BR fmtmsg (3) |
c13182ef | 36 | function. |
fb8d1da0 | 37 | By default, that function knows only how to |
fea681da | 38 | print messages for severity 0-4 (with strings (none), HALT, |
c13182ef MK |
39 | ERROR, WARNING, INFO). |
40 | This call attaches the given string | |
fea681da MK |
41 | .I s |
42 | to the given value | |
43 | .IR severity . | |
44 | If | |
45 | .I s | |
46 | is NULL, the severity class with the numeric value | |
47 | .I severity | |
48 | is removed. | |
49 | It is not possible to overwrite or remove one of the default | |
c13182ef | 50 | severity classes. |
2fda57bd | 51 | The severity value must be nonnegative. |
47297adb | 52 | .SH RETURN VALUE |
fea681da MK |
53 | Upon success, the value |
54 | .B MM_OK | |
c13182ef MK |
55 | is returned. |
56 | Upon error, the return value is | |
fea681da MK |
57 | .BR MM_NOTOK . |
58 | Possible errors include: out of memory, attempt to remove a | |
59 | nonexistent or default severity class. | |
c343e74c MK |
60 | .SH VERSIONS |
61 | .BR addseverity () | |
62 | is provided in glibc since version 2.1. | |
fae930d4 MS |
63 | .SH ATTRIBUTES |
64 | For an explanation of the terms used in this section, see | |
65 | .BR attributes (7). | |
66 | .TS | |
67 | allbox; | |
68 | lb lb lb | |
69 | l l l. | |
70 | Interface Attribute Value | |
71 | T{ | |
72 | .BR addseverity () | |
73 | T} Thread safety MT-Safe | |
74 | .TE | |
47297adb | 75 | .SH CONFORMING TO |
fea681da | 76 | This function is not specified in the X/Open Portability Guide |
c13182ef | 77 | although the |
fb186734 | 78 | .BR fmtmsg (3) |
c13182ef MK |
79 | function is. |
80 | It is available on System V | |
fea681da | 81 | systems. |
2b2581ee MK |
82 | .SH NOTES |
83 | New 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) |