Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gets(3)

getws(3)

printf(3)

putc(3)

puts(3)

putwc(3)

putws(3)  —  Subroutines

OSF

NAME

putws, fputws − Writes a string to a stream

LIBRARY

Standard I/O Library (libc.a)

SYNOPSIS

#include <stdio.h>
#include <NLchar.h> int putws (
NLchar ∗string ); int fputws (
NLchar ∗string,
FILE ∗stream );

PARAMETERS

stringPoints to a string to be written to output. 

streamPoints to the FILE structure of an open file. 

DESCRIPTION

The putws() and fputws() functions are provided when Japanese Language Support is installed on your system.  They parallel the puts() and fputs() functions. 

The putws() function writes the NLchar string pointed to by the string parameter to the standard output stream, stdout. In this case, each element of the string parameter produces either 1 or 2 bytes of output, according to the size required for its encoding. In all other respects, putws() functions like puts(). 

The fputws() function writes the NLchar string pointed to by the string parameter to the output stream.  Again, each element of the string parameter produces either 1 or 2 bytes of output, according to the size required for its encoding.  In all other respects, fputws() functions like fputs(). 

RETURN VALUES

Upon successful completion, the putws() and fputws() functions return the number of characters written. Both subroutines return EOF on an error. This happens if the routines try to write on a file that has not been opened for writing. 

RELATED INFORMATION

Functions: gets(3), getws(3), printf(3), putc(3), puts(3), putwc(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026