Writes a wide-character string to a stream.
Standard I/O Library (libc.a)
#include <stdio.h>
int putws ( String)
const wchar_t *String;
int fputws (String, Stream)
const wchar_t *String;
FILE *Stream;
The putws subroutine writes the const wchar_t string pointed to by the String parameter to the standard output stream (stdout) as a multibyte character string and appends a new-line character to the output. In all other respects, the putws subroutine functions like the puts subroutine.
The fputws subroutine writes the const wchar_t string pointed to by the String parameter to the output stream as a multibyte character string. In all other respects, the fputws subroutine functions like the fputs subroutine.
After the putws or fputws subroutine runs successfully, and before the next successful completion of a call to the fflush or fclose subroutine on the same stream or a call to the exit or abort subroutine, the st_ctime and st_mtime fields of the file are marked for update.
String | Points to a string to be written to output. |
Stream | Points to the FILE structure of an open file. |
Upon successful completion, the putws and fputws subroutines return a nonnegative number. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.
The putws or fputws subroutine is unsuccessful if the stream is not buffered or data in the buffer needs to be written, and one of the following errors occur:
Other wide-character I/O subroutines: getwc, fgetwc, or getwchar Subroutine, getws or fgetws Subroutine, putwc, putwchar, or fputwc Subroutine, and ungetwc subroutine.
Related standard I/O subroutines: fopen, fopen64, freopen, freopen64 or fdopen Subroutine, gets or fgets Subroutine,printf, fprintf, sprintf, snprintf, wsprintf, vprintf, vfprintf, vsprintf, or vwsprintf Subroutine, putc, putchar, fputc, or putw Subroutine, puts or fputs Subroutine, fread or fwrite Subroutine.
Subroutines, Example Programs, and Libraries in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
National Language Support Overview and Multibyte Code and Wide Character Code Conversion Subroutines in AIX 5L Version 5.2 National Language Support Guide and Reference.