addsev man page on Solaris

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
Solaris logo
[printable version]

addsev(3C)		 Standard C Library Functions		    addsev(3C)

NAME
       addsev - define additional severities

SYNOPSIS
       #include <pfmt.h>

       int addsev(int int_val, const char *string);

DESCRIPTION
       The  addsev()  function defines additional severities for use in subse‐
       quent calls to pfmt(3C) or lfmt(3C). It	associates  an	integer	 value
       int_val	in  the range [5-255] with a character string, overwriting any
       previous string association between int_val and string.

       If int_val is OR-ed with the flags argument passed to subsequent	 calls
       to  pfmt()  or  lfmt(), string will be used as severity. Passing a null
       string removes the severity.

RETURN VALUES
       Upon  successful	 completion,  addsev()	returns	  0.	Otherwise   it
       returns−1.

USAGE
       Only the standard severities are automatically displayed for the locale
       in effect at runtime. An application must provide the  means  for  dis‐
       playing	locale-specific	 versions of add-on severities. Add-on severi‐
       ties are only effective within the applications defining them.

EXAMPLES
       Example 1: Example of addsev() function.

       The following example

       #define Panic 5
       setlabel("APPL");
       setcat("my_appl");
       addsev(Panic, gettxt(":26", "PANIC"));
       /* ... */
       lfmt(stderr, MM_SOFT|MM_APPL|PANIC, ":12:Cannot locate database\n");

       will display the message to stderr and forward to the logging service

       APPL: PANIC: Cannot locate database

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │MT-Level		     │MT-safe			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       gettxt(3C), lfmt(3C), pfmt(3C), attributes(5)

SunOS 5.10			  29 Dec 1996			    addsev(3C)
[top]

List of man pages available for Solaris

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net