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

setlabel(3C)						   Standard C Library Functions 					      setlabel(3C)

NAME
setlabel - define the label for pfmt() and lfmt() SYNOPSIS
#include <pfmt..h> int setlabel(const char *label); DESCRIPTION
The setlabel() function defines the label for messages produced in standard format by subsequent calls to lfmt(3C) and pfmt(3C). The label argument is a character string no more than 25 characters in length. No label is defined before setlabel() is called. The label should be set once at the beginning of a utility and remain constant. A null pointer or an empty string passed as argument will reset the definition of the label. RETURN VALUE
Upon successful completion, setlabel() returns 0; otherwise, it returns a non-zero value. EXAMPLES
The following code (without previous call to setlabel()): pfmt(stderr, MM_ERROR, "test:2:Cannot open file "); setlabel("UX:test"); pfmt(stderr, MM_ERROR, "test:2:Cannot open file "); will produce the following output: ERROR: Cannot open file UX:test: ERROR: Cannot open file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
getopt(3C), lfmt(3C), pfmt(3C), attributes(5) SunOS 5.10 29 Dec 1996 setlabel(3C)
Man Page