sprintmsg [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
sprintmsg
Prints formatted output with numbered arguments to a character array.
Syntax
int sprintmsg (char *s, char *format [, arg] ...)
Parameters
s A pointer to a character array where the output is directed
format A pointer to the string containing the formatting
information. It contains optional placeholders and
formatting specifications where arg1 thru argn are to be
substituted.
arg1 ... A character, character pointer, or integer value giving the
argn parameter to be converted, formatted, and merged with
format prior to output.
Return Values
x The number of characters transmitted.
EOF Indicates failure.
Description
This function is derived from printf(). In sprintmsg(), the conversion
character % is replaced by the sequence %n$. The n character is a
decimal digit in the range 1-9, and indicates that this conversion should
be applied to the nth argument, rather than to the next unused one. All
other aspects of formatting are unchanged. All conversion specifications
must contain the %n$ sequence, and you should make sure the numbering is
correct. All parameters must be used exactly once.
See printf() for more details on
formatting and conversion specifications.
See Also
fprintmsg(), printf(), printmsg()
MPE/iX 5.0 Documentation