Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/addseverity.3c
Real path: /usr/share/man/man3c/addseverity.3c
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 1997, 2021, Oracle and/or its affiliates. .TH addseverity 3C "11 May 2021" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME addseverity \- build a list of severity levels for an application for use with fmtmsg .SH SYNOPSIS .LP .nf #include <fmtmsg.h> \fBint\fR \fBaddseverity\fR(\fBint\fR \fIseverity\fR, \fBconst char *\fR\fIstring\fR); .fi .SH DESCRIPTION .sp .LP The \fBaddseverity()\fR function builds a list of severity levels for an application to be used with the message formatting facility \fBfmtmsg()\fR. The \fIseverity\fR argument is an integer value indicating the seriousness of the condition. The \fIstring\fR argument is a pointer to a string describing the condition (string is not limited to a specific size). .sp .LP If \fBaddseverity()\fR 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. .sp .LP If \fBaddseverity()\fR 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 \fBaddseverity()\fR is called with a negative number or an integer value of 0, 1, 2, 3, or 4, the function fails and returns \fB\(mi1\fR. The values 0\(mi4 are reserved for the standard severity levels and cannot be modified. Identifiers for the standard levels of severity are: .sp .ne 2 .mk .na \fB\fBMM_HALT\fR\fR .ad .RS 14n .rt Indicates that the application has encountered a severe fault and is halting. Produces the print string \fBHALT\fR. .RE .sp .ne 2 .mk .na \fB\fBMM_ERROR\fR\fR .ad .RS 14n .rt Indicates that the application has detected a fault. Produces the print string \fBERROR\fR. .RE .sp .ne 2 .mk .na \fB\fBMM_WARNING\fR\fR .ad .RS 14n .rt Indicates a condition that is out of the ordinary, that might be a problem, and should be watched. Produces the print string \fBWARNING\fR. .RE .sp .ne 2 .mk .na \fB\fBMM_INFO\fR\fR .ad .RS 14n .rt Provides information about a condition that is not in error. Produces the print string \fBINFO\fR. .RE .sp .ne 2 .mk .na \fB\fBMM_NOSEV\fR\fR .ad .RS 14n .rt Indicates that no severity level is supplied for the message. .RE .sp .LP Severity levels may also be defined at runtime using the \fBSEV_LEVEL\fR environment variable (see \fBfmtmsg\fR(3C)). .SH RETURN VALUES .sp .LP Upon successful completion, \fBaddseverity()\fR returns \fBMM_OK\fR. Otherwise it returns \fBMM_NOTOK\fR. .SH EXAMPLES .LP \fBExample 1\fR Example of \fBaddseverity()\fR function. .sp .LP When the function call .sp .in +2 .nf addseverity(7,"ALERT") .fi .in -2 .sp .sp .LP is followed by the call .sp .in +2 .nf fmtmsg(MM_PRINT, "UX:cat", 7, "invalid syntax", "refer to manual", "UX:cat:001") .fi .in -2 .sp .sp .LP the resulting output is .sp .in +2 .nf UX:cat: ALERT: invalid syntax TO FIX: refer to manual UX:cat:001 .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level Safe .TE .sp .SH SEE ALSO .sp .LP \fBfmtmsg\fR(1), \fBfmtmsg\fR(3C), \fBgettxt\fR(3C), \fBprintf\fR(3C), \fBattributes\fR(7)