Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) spt_vfprintfx(2)
NAME
spt_vfprintfx - Formats a variable number of parameters for output (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <stdarg.h>]
[#include <stdio.h>]
#include <spthread.h>
int spt_vfprintfx (
FILE *stream,
const char *format,
va_list printarg
);
PARAMETERS
stream Specifies the output stream.
format Specifies a character string that contains two types of objects:
Plain characters, which are copied to the output stream.
Conversion specifications, each of which causes zero or more items to be
fetched from the stdarg parameter lists.
printarg Specifies the parameters to be printed.
DESCRIPTION
The spt_vfprintfx( ) function is the thread-aware version of the vfprintf() function.
The spt_vfprintfx( ) function formats and writes stdarg parameter lists.
This function is the same as the spt_fprintfx( ) function, except that it is not called with a vari-
able number of parameters. Instead, it is called with a parameter list pointer as defined by stdarg.
NOTES
The macro to map vfprintf() to spt_vfprintfx() is available in C applications when
SPT_THREAD_AWARE_NONBLOCK has been defined in the following manner before
including spthread.h:
#define SPT_THREAD_AWARE_NONBLOCK
The alias to link vfprintf() to spt_vfprintfx() is available in C++ applications when
SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been defined in the following manner
before including spthread.h:
#define SPT_THREAD_AWARE_PRAGMA_NONBLOCK
EXAMPLES
The following example demonstrates how you can use the spt_vfprintfx( ) function to write an
error routine:
#include <stdarg.h>
#include <stdio.h>
#define SPT_THREAD_AWARE_NONBLOCK
#include <spthread.h>
void error(char *funct, char *fmt, ...)
527186-023 Hewlett-Packard Company 7443