Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getc(3)

getwc(3)

printf(3)

putc(3)

puts(3)

wsprintf(3)

putwc(3)  —  Subroutines

OSF

NAME

putwc, putwchar, fputwc − Writes a character or a word to a stream

LIBRARY

Standard I/O Library (libc.a)

SYNOPSIS

#include <stdio.h>
int putwc(
int c,
FILE ∗stream );
int putwchar(
int c );
int fputwc(
int c;
FILE ∗stream );

PARAMETERS

cSpecifies the NLchar to be written. 

streamPoints to the output data. 

DESCRIPTION

The putwc(), putwchar(), and fputwc() functions are provided when Japanese Language Support is installed on your system.  They parallel the putc(), putchar(), and fputc() functions. 

The putwc() function writes the NLchar specified by the c parameter to the stream parameter as 1 or 2 bytes. 

The putwchar() macro works like the putwc() function, except that putwchar() writes the specified NLchar to the standard output. 

The fputwc() function works the same as putwc(). 

With the exception of stderr, output streams are, by default, buffered if they refer to files, or line-buffered if they refer to terminals. The standard error output stream, stderr, is unbuffered by default, but using the freopen() function causes it to become buffered or line-buffered. Use the setbuf() function to change the stream’s buffering strategy. 

RETURN VALUES

Upon successful completion, these functions each return the value written. If these functions fail, they return the constant EOF.  They fail if the stream parameter is not open for writing, or if the output file size cannot be increased. 

RELATED INFORMATION

Functions: getc(3), getwc(3), printf(3), putc(3), puts(3), wsprintf(3)

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