HP-UX Reference (11i v2 03/08) - 3 Library Functions A-M (vol 6)

f
fwprintf(3C) fwprintf(3C)
RETURN VALUE
Upon successful completion, these functions return the number of wide-characters transmitted excluding
the terminating null wide-character in the case of
swprintf() or a negative value if an output error
was encountered.
ERRORS
For the conditions under which
fwprintf() and wprintf() will fail and may fail, refer to
fputwc(); see putwc(3C). In addition, all forms of
fwprintf() may fail if:
[EILSEQ] A wide-character code that does not correspond to a valid character has been
detected.
[EINVAL] There are insufficient arguments.
[ENOMEM] Insufficient storage space is available.
In addition,
wprintf() may fail if:
[EILSEQ]
stdout is byte-oriented.
fwprintf() may fail if:
[EILSEQ] The stream pointed to by stream is byte-oriented.
EXAMPLES
To print the language-independent date and time format, the following statement could be used:
wprintf(format, weekday, month, day, hour, min);
For American usage, format could be a pointer to the wide-character string:
L"%s, %s %d %d:%.2d"
producing the message:
Sunday, July 3, 10:02
whereas for German usage, format could be a pointer to the wide-character string:
L"%1$s, %3$d. %2$s, %4$d:%5$.2d"
producing the message:
Sonntag, 3. Juli, 10:02
AUTHOR
fwprintf(), wprintf(), swprintf() were developed by HP and Mitsubishi Electric Corporation.
SEE ALSO
btowc(3C), fputwc(3C), fwscanf(3C), putwc(3C), setlocale(3C), mbrtowc(3C), orientation(5),
thread_safety(5).
HP-UX 11i Version 2: August 2003 4 Hewlett-Packard Company Section 3333