Open System Services System Calls Reference Manual (G06.28+, H06.05+)

System Functions (s and S) spt_printfx(2)
NAME
spt_printfx - Prints formatted output to the standard output stream (thread-aware function)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <stdio.h>]
#include <spthread.h>
int spt_printfx (
const char *format
[, value]...
);
PARAMETERS
format Species a character string combining literal characters with conversion
specications.
value Species the data to be converted according to the format parameter.
DESCRIPTION
The spt_printfx( ) function is the thread-aware version of the printf() function.
The spt_printfx( ) function converts, formats, and writes its value parameters, under control of
the format parameter, to the standard output stream stdout.
The format parameter is a character string that contains two types of objects:
Literal characters, which are copied to the output stream.
Conversion specications, each of which causes zero or more items to be fetched from
the value parameter list.
If not enough items for format are in the value parameter list, the results are unpredictable. If
more values remain after the entire format has been processed, they are ignored.
Conversion Specications
Each conversion specication in the format parameter has the following syntax:
A % (percent sign).
The spt_printfx( ) function can handle a format string that enables the system to process
elements of the parameter list in variable order. In such a case, the normal conversion
character % (percent sign) is replaced by %digit$, where digit is a decimal number in
the range from 1 to NL_ARGMAX. Conversion is then applied to the specied argu-
ment, rather than to the next unused argument. This feature provides for the denition of
format strings in an order appropriate to specic languages. When variable ordering is
used, the * (asterisk) specication for eld width in precision is replaced by %digit$.If
the variable ordering feature is used, it must be specied for all conversions.
Zero or more ags that modify the meaning of the conversion specication. The ag
characters and their meanings are:
- Left align the result of the conversion within the eld.
527186-007 Hewlett-Packard Company 7213