1addseverity(3)             Library Functions Manual             addseverity(3)
2
3
4

NAME

6       addseverity - introduce new severity classes
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <fmtmsg.h>
13
14       int addseverity(int severity, const char *s);
15
16   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18       addseverity():
19           Since glibc 2.19:
20               _DEFAULT_SOURCE
21           glibc 2.19 and earlier:
22               _SVID_SOURCE
23

DESCRIPTION

25       This function allows the introduction of new severity classes which can
26       be addressed by the severity argument of the  fmtmsg(3)  function.   By
27       default,  that  function  knows only how to print messages for severity
28       0-4 (with strings (none), HALT, ERROR, WARNING, INFO).  This  call  at‐
29       taches  the  given string s to the given value severity.  If s is NULL,
30       the severity class with the numeric value severity is removed.   It  is
31       not  possible  to  overwrite  or  remove  one  of  the default severity
32       classes.  The severity value must be nonnegative.
33

RETURN VALUE

35       Upon success, the value MM_OK is  returned.   Upon  error,  the  return
36       value  is MM_NOTOK.  Possible errors include: out of memory, attempt to
37       remove a nonexistent or default severity class.
38

ATTRIBUTES

40       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
41       tributes(7).
42
43       ┌────────────────────────────────────────────┬───────────────┬─────────┐
44Interface                                   Attribute     Value   
45       ├────────────────────────────────────────────┼───────────────┼─────────┤
46addseverity()                               │ Thread safety │ MT-Safe │
47       └────────────────────────────────────────────┴───────────────┴─────────┘
48

STANDARDS

50       GNU.
51

HISTORY

53       glibc 2.1.  System V.
54

NOTES

56       New  severity  classes  can  also  be  added by setting the environment
57       variable SEV_LEVEL.
58

SEE ALSO

60       fmtmsg(3)
61
62
63
64Linux man-pages 6.05              2023-07-20                    addseverity(3)
Impressum