addsev(S)
addsev --
define additional severities
Syntax
cc ...-lc
#include <pfmt.h>
int addsev(int int_val, const char *string);
Description
addsev(S)
defines additional severities for use in subsequent calls to
pfmt(S).
Those add-on severities are effective
only within the applications defining them.
addsev( )
associates an integer value int_val
in the range 5 to 255 inclusive
with a character string, string.
It overwrites any previous association between
int_val and string.
If int_val is ORed with the flags passed to subsequent calls to
pfmt( ),
string is used as the severity.
Passing a null string removes the severity.
Only the standard severities are automatically displayed
for the locale in effect at run time.
An application must provide the means for displaying locale-specific
versions of add-on severities.
Return values
addsev( )
returns 0 in case of success, otherwise -1.
Diagnostics
This function does not set errno.
Examples
The example below displays the message to
stderr and forwards it to the logging service:
#define Panic 5
setlabel("APPL");
setcat("my_appl");
addsev(Panic, gettxt(":26", "PANIC"));
/* ... */
See also
gettxt(S),
pfmt(S)
Standards conformance
addsev(S)
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2003 System Services (S)
SCO OpenServer Release 5.0.7 -- 11 February 2003