Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > A

addsev(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

addsev() — define additional severities for formatting routines

SYNOPSIS

#include <pfmt.h>

int addsev(int sev, const char *sev_string);

DESCRIPTION

The addsev() routine allows the user to define additional severities to be used by formatting routines (see pfmt(3C)) in the standard message format. sev is the severity level. It must be between 5 and 255 inclusively. sev_string is a character string to be associated for this severity level. If the severity component of the flags parameter of the formatting routines matches sev, sev_string is printed as the severity string.

The addsev() routine may be called multiple times to set up a list of associations. If sev is already set, sev_string overwrites the previous string. If sev_string is NULL, the association is removed from the list.

addsev() assumes that sev_string has already been translated into a locale-specific string using the current locale.

RETURN VALUE

If successful, addsev() returns zero. Otherwise, it returns -1.

EXAMPLE

#define MM_USER 10 addsev(MM_USER, "MY_NOTE"); pfmt(stdout, MM_USER|MM_GET,"my_appl_cat:1:The file is writable");

This example writes the following message to standard output:

MY_NOTE: The file is writable

STANDARDS COMPLIANCE

addsev(): SVID3

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.