HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
putws(3C) putws(3C)
NAME
putws(), fputws() - put a wide character string on a stream file
SYNOPSIS
#include <wchar.h>
int putws(const wchar_t *ws);
int fputws(const wchar_t *ws, FILE *stream);
Obsolescent Interfaces
int putws_unlocked(const wchar_t *ws);
int fputws_unlocked(const wchar_t *ws, FILE *stream);
Remarks:
fputws is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions.
These functions parallel the 8 bit character I/O functions defined in puts(3S).
DESCRIPTION
putws() writes a character string corresponding to the null-terminated wide-character string pointed to
by ws followed by a new-line character, to the standard output stream stdout.
fputws() writes a character string corresponding to the null-terminated wide-character string pointed to
by ws to the named output stream, but does not append a new-line character or a terminating null charac-
ter.
Neither function writes a terminating null character.
The definition for these functions, the type wchar_t and the value WEOF are provided in the <
wchar.h>
header.
Obsolescent Interfaces
putws_unlocked() and fputws_unlocked()
put a wide character string on a stream file.
APPLICATION USAGE
putws() and fputws() are thread-safe interfaces. These interfaces are not async-cancel-safe. A can-
cellation point may occur when a thread is executing putws() or fputws().
After putws() or fputws() is applied to a stream, the stream becomes wide-oriented (see orienta-
tion(5)).
EXTERNAL INFLUENCES
Locale
The
LC_CTYPE category determines how wide character conversions are done.
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
Upon successful completion, putws(), putws_unlocked()
, fputws(), and
fputws_unlocked()
return a non-negative number. Otherwise they return WEOF, set the error indi-
cator for the stream, and set
errno to indicate the error.
ERRORS
putws(), putws_unlocked(), fputws(), and fputws_unlocked()
fail if either the stream is
unbuffered, or stream’s buffer needed to be flushed causing an underlying
write() call to be invoked,
and:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the process
would be delayed in the write operation.
[EBADF] The file descriptor underlying stream is not a valid file descriptor open for writing.
[EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or the
maximum file size (see ulimit(2)).
HP-UX Release 11i: December 2000 − 1 − Section 3−−739
___
___