SPRINTMT(3) Library Routines SPRINTMT(3)
sprintmt, vsprintmt - multi threading safe print formatting
char *sprintmt (char *buffer, size_t bufferlen, const char *fmt, ...);
char *vsprintmt (char *buffer, size_t bufferlen, const char *fmt,
sprintmt and vsprintmt are multithread-safe versions of the sprintf(3)
and vsprintf(3) routines.
The contents of the format string fmt, with appropriate arguments sub-
stituted for the format specifiers, is copied into the user supplied
buffer. At most, bufferlen-1 characters will be written to buffer.
These routines have a much more limited set of format specifiers than
do the usual stdio routines. They are:
Print the decimal representation of a value of type int
or long int, respectively.
Print the decimal representation of a value of type
unsigned int or unsigned long int, respectively.
%x, %X, %lx, %lX
Print the hexadecimal representation of an unsigned int
or unsigned long int. If the x character is used, alpha-
betic characters are in lower case; otherwise they are in
%s Print a NULL-terminated string. If the 's' is preceeded
by an 'l', the 'l' is ignored.
%m Print the current textual representation of errno, as
returned by strerror(3). If the 'm' is preceeded by an
'l', the 'l' is ignored. This format specifier is not
available in the usual stdio functions.
These routines return a pointer to the terminating NULL byte in buffer.
printf(3), stdio(3), strerror(3).
GNO 24 October 1998 SPRINTMT(3)
Man(1) output converted with