*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> addseverity (3c)              
Title
Content
Arch
Section
 

Contents


addseverity(3C)						       addseverity(3C)


NAME    [Toc]    [Back]

     addseverity - build a list	of severity levels for an application for use
     with fmtmsg

SYNOPSIS    [Toc]    [Back]

     #include <fmtmsg.h>

     int addseverity(int severity, const char *string);

DESCRIPTION    [Toc]    [Back]

     The addseverity function builds a list of severity	levels for an
     application to be used with the message formatting	facility, fmtmsg.
     severity is an integer value indicating the seriousness of	the condition,
     and string	is a pointer to	a string describing the	condition (string is
     not limited to a specific size).

     If	addseverity is called with an integer value that has not been
     previously	defined, the function adds that	new severity value and print
     string to the existing set	of standard severity levels.

     If	addseverity is called with an integer value that has been previously
     defined, the function redefines that value	with the new print string.
     Previously	defined	severity levels	may be removed by supplying the	NULL
     string.  If addseverity is	called with a negative number or an integer
     value of 0, 1, 2, 3, or 4,	the function fails and returns -1.  The	values
     0-4 are reserved for the standard severity	levels and cannot be modified.
     Identifiers for the standard levels of severity are:

	  MM_HALT	indicates that the application has encountered a
			severe fault and is halting.  Produces the print
			string HALT.

	  MM_ERROR	indicates that the application has detected a fault.
			Produces the print string ERROR.

	  MM_WARNING	indicates a condition that is out of the ordinary,
			that might be a	problem, and should be watched.
			Produces the print string WARNING.

	  MM_INFO	provides information about a condition that is not in
			error.	Produces the print string INFO.

	  MM_NOSEV	indicates that no severity level is supplied for the
			message.

     Severity levels may also be defined at run	time using the SEV_LEVEL
     environment variable [see fmtmsg(3C)].

EXAMPLES    [Toc]    [Back]

     When the function addseverity is used as follows:
	  addseverity(7,"ALERT")
     the following call	to fmtmsg:



									Page 1






addseverity(3C)						       addseverity(3C)



	  fmtmsg(MM_PRINT, "UX:cat", 7,	"invalid syntax", "refer to manual",
	  "UX:cat:001")
     produces:
	  UX:cat: ALERT: invalid syntax
	  TO FIX: refer	to manual   UX:cat:001

NOTES    [Toc]    [Back]

     A slightly	different standard error message format	and new	developer
     interfaces, pfmt, lfmt, and addsev, are being introduced as the
     replacements for fmtmsg and addseverity.  fmtmsg and addseverity will be
     removed at	a future time.

SEE ALSO    [Toc]    [Back]

      
      
     fmtmsg(1M), fmtmsg(3C), gettxt(3C), printf(3S).

DIAGNOSTICS    [Toc]    [Back]

     addseverity returns MM_OK on success or MM_NOTOK on failure.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
appres Tru64 list X application resource database
appres IRIX list X application resource database
DtSaverGetWindows HP-UX get the list of windows for drawing by a screen saver application
glubuild1dmipmaplevels IRIX builds a subset of one-dimensional mipmap levels
glubuild2dmipmaplevels IRIX builds a subset of two-dimensional mipmap levels
glubuild3dmipmaplevels IRIX builds a subset of three-dimensional mipmap levels
spl Tru64 General: Sets the processor priority to mask different levels of interrupts
apanel IRIX control panel for Audio Hardware: input and output levels, rates, sources and syncs
MrmFetchWidgetOverride HP-UX Fetches any indexed (UIL named) application widget. It overrides the arguments specified for this application
MrmFetchWidgetOverride IRIX Fetches any indexed (UIL named) application widget. It overrides the arguments specified for this application
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service