vprintf man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

vprintf(3S)							   vprintf(3S)

NAME
       vprintf(), vfprintf(), vsprintf(), vsnprintf() - print formatted output
       of a varargs argument list

SYNOPSIS

DESCRIPTION
       and are the same as and respectively,  except  that  instead  of	 being
       called  with  a	variable  number of arguments, they are called with an
       argument list as defined by

RETURN VALUE
       Each function returns the number of bytes  transmitted  (excluding  the
       null  byte  character  in  the case of or a negative value if an output
       error was encountered.

       By default, returns a negative value if maxsize	is  smaller  than  the
       number of characters formatted.	In the UNIX 2003 standards environment
       (see standards(5)) it returns the number of bytes that would have  been
       written	to  buffer  s, excluding the terminating null byte, if maxsize
       had been sufficiently large.

EXAMPLES
       The following demonstrates how could be used to write an error routine:

	      #include <stdarg.h>
	      #include <stdio.h>
		  .
		  .
		  .
	      /*
	       *  error should be called using the form:
	       *      error(function_name, format, arg1, arg2...);
	       */

	      /*VARARGS0*/
	      void
	      error(va_alist)
	      va_dcl
	      {
		  va_list args;
		  char *fmt;

		  va_start(args);

		  /* print out name of function causing error */
		  (void)fprintf(stderr, "ERROR in %s: ", va_arg(args, char *));
		  fmt = va_arg(args, char *);

		  /* print out remainder of message */
		  (void)vfprintf(stderr, fmt, args);
		  va_end(args);
		  (void)abort( );
	      }

SEE ALSO
       setlocale(3C), printf(3S), standards(5), thread_safety(5),  varargs(5),
       glossary(9).

STANDARDS CONFORMANCE
								   vprintf(3S)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net