MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                           addsev(3C)



NAME
     addsev - define additional severities

SYNOPSIS
     #include 

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


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


     If intval is OR-ed with the flags argument passed to subse-
     quent  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 displaying locale-specific versions of  add-on
     severities.  Add-on severities are only effective within the
     applications defining them.

EXAMPLES
     Example 1 Example of addsev() function.


     The following example


       #define Panic 5
       setlabel("APL");
       setcat("myappl");
       addsev(Panic, gettxt(":26", "PANIC"));
       /* ... */
       lfmt(stderr, MSOFTMAPLPANIC, ":12:Cannot locate database\n");



     will display the message to stderr and forward to  the  log-
     ging service





SunOS 5.11          Last change: 29 Dec 1996                    1






Standard C Library Functions                           addsev(3C)



       APL: PANIC: Cannot locate database


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     MT-safe                     
    


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





































SunOS 5.11          Last change: 29 Dec 1996                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™