Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setlabel(3c) [hpux man page]

setlabel(3C)															      setlabel(3C)

NAME
setlabel() - define label for formatting routines SYNOPSIS
DESCRIPTION
The system call defines a label to be printed by formatting routines (see pfmt(3C)) in the standard message format. label is a character string limited to 25 characters in length. If label is NULL or an empty string, the label is reset to no label. No label is defined before assumes that label has already been translated into a locale-specific string using the current locale. RETURN VALUE
returns zero upon successful completion or nonzero if the routine failed. EXAMPLES
This example, with no label defined: generates: Using generates: SEE ALSO
pfmt(3C), thread_safety(5). STANDARDS COMPLIANCE
setlabel(3C)

Check Out this Related Man Page

pfmt(3C)																  pfmt(3C)

NAME
pfmt(), vpfmt() - display message in standard format SYNOPSIS
DESCRIPTION
The system call can be used to write a message in standard format to stream. It can also be used to write a localized string to stream. The arguments to are formatted using style formatting. is similar to except that the arguments are passed in an argument list (see stdarg(5)). The standard format displayed on stream has the following fields: The label string is defined through setlabel(3C). If no label is defined, this field is not used. The severity string is controlled by the severity group of flags. The text string is the formatted user string. The flags control how formatting is done. The control information is separated into several different groups. Only one flag from each group should be set. Output Format Do not use the standard format. Treat fmt as a format string. In this mode, only flags related to catalog access can be set. Format using the standard format is the default). Catalog Access Do not access the localized message catalog. Use the def_str (a field in fmt) as the format string. Access the localized message catalog is the default). Severity Display a localized string. Display a localized string is the default). Display a localized string. Display a localized string. Besides these reserved severities, additional severity strings may be defined by the user (see addsev(3C)). To specify a user defined severity, flags should be a logical-or of the numeric value of the user defined severity and flags from other control groups. Action This flag generates the localized string of in the severity field of the standard format message. If this flag and flags from the severity control group are set, this flag has precedence and the string will be displayed. The fmt string has the following fields: The catalog is the message catalog created by mkmsgs(1) where the localized message is to be retrieved. The msg_number is a positive index number identifying the string to be retrieved from the message catalog (begins at 1). The def_str is the default string to use if fails to retrieve the message from catalog from either the current locale or the default locale. The failure may occur if the message catalog does not exist or if the msg_number is out of bound. If catalog is not specified, uses the message catalog defined by setcat(3C). If is set in flags, only def_str must be specified. The system call displays under the following conditions: o No message catalog is specified in fmt and no catalog is defined via setcat(3C). o msg_number is not positive. o No message could be retrieved and def_str is not specified. RETURN VALUE
If successful, and return the number of bytes written. Otherwise, they return a negative value. EXAMPLES
Example 1 generates the message: Example 2 generates the message: Example 3 generates the message: Example 4 generates the message: SEE ALSO
mkmsgs(1), addsev(3C), gettxt(3C), printf(3S), setcat(3C), setlabel(3C), setlocale(3C), stdarg(5), thread_safety(5). STANDARDS CONFORMANCE
pfmt(3C)
Man Page