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

  man pages->IRIX man pages -> setlabel (3c)              


setlabel(3C)							  setlabel(3C)

NAME    [Toc]    [Back]

     setlabel -	define the label for pfmt and lfmt.

SYNOPSIS    [Toc]    [Back]

     #include <pfmt.h>

     int setlabel(const	char *label<b>);

DESCRIPTION    [Toc]    [Back]

     The routine setlabel defines the label for	messages produced in standard
     format by subsequent calls	to lfmt, vlfmt,	pfmt, and vpfmt.

     label is a	character string no more than 25 characters in length.

     No	label is defined before	setlabel is called.  A null pointer or an
     empty string passed as argument will reset	the definition of the label.

EXAMPLE    [Toc]    [Back]

     The following code	(without previous call to setlabel):

	  pfmt(stderr, MM_ERROR, "test:2:Cannot	open file\n");
	  pfmt(stderr, MM_ERROR, "test:2:Cannot	open file\n");

     will produce the following	output:
	  ERROR: Cannot	open file
	  UX:test: ERROR: Cannot open file

SEE ALSO    [Toc]    [Back]

     getopt(3C), lfmt(3C), pfmt(3C)

DIAGNOSTICS    [Toc]    [Back]

     setlabel returns 0	in case	of success, non-zero otherwise.

NOTES    [Toc]    [Back]

     The label should be set once at the beginning of a	utility	and remain

     getopt(3C)	has been modified to report errors using the standard message
     format.  If setlabel is called before getopt, getopt will use that	label.
     Otherwise,	getopt will use	the name of the	utility.

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
define_key OpenBSD define a keycode
define_key FreeBSD define a keycode
glScissor Tru64 define the scissor box
glscissor IRIX define the scissor box
glMap2d Tru64 define a two-dimensional evaluator
glMap2 Tru64 define a two-dimensional evaluator
glMap1f Tru64 define a one-dimensional evaluator
glMap1d Tru64 define a one-dimensional evaluator
addsev IRIX define additional severities
glMap1 Tru64 define a one-dimensional evaluator
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service