Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fputws(3S) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fopen(3S)

lfs(5)

stdio(5)

wchar(5)

fputws(3S)                                                       fputws(3S)

NAME
     fputws - put wide character string on a stream

SYNOPSIS
     cc [flag ...] file ... -lw [library ...]

     #include <stdio.h>
     #include <wchar.h>

     int fputws(const wchart *ws, FILE *stream);

DESCRIPTION
     The fputws() function writes a character string corresponding to the
     (null-terminated) wide character string pointed to by ws to the stream
     pointed to by stream. No character corresponding to the terminating
     null wide-character code is written.

     The fputws() function does not append a newline character.

     The stctime and stmtime fields of the file will be marked for update
     between the successful execution of fputws() and the next successful
     completion of a call to fflush() or fclose() on the same stream or a
     call to exit() or abort().

ERRORS
     The following error code descriptions are function-specific. You will
     find a general description in introprm2(2) or in errno(5).

     The fputws() function will fail if either the stream is unbuffered or
     data in the streams buffer needs to be written and:

     EAGAIN    The ONONBLOCK flag is set for the file descriptor underly-
               ing 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 max-
               imum file size or the process file size limit [see
               ulimit(2)].

     EFBIG     The file is a regular file and an attempt was made to write
               at or beyond the offset maximum associated with the corres-
               ponding stream.

     EINTR     The write operation was terminated due to the receipt of a
               signal, and no data was transferred.







Page 1                       Reliant UNIX 5.44                Printed 11/98

fputws(3S)                                                       fputws(3S)

     EIO       The process is a member of a background process group
               attempting to write to its controlling terminal, TOSTOP is
               set, the process is neither ignoring nor blocking SIGTOU and
               the process group of the process is orphaned. This error may
               also be returned under implementation-dependent conditions.

     ENOSPC    There was no free space remaining on the device containing
               the file.

     EPIPE     An attempt is made to write a pipe or FIFO that is not open
               for reading by any process. A SIGPIPE signal will also be
               sent to the process.

     The fgetws() function will fail if:

     ENOMEM    Insufficient storage space is available.

     ENXIO     A request was made of a non-existent device, or the request
               was outside the capabilities of the device.

     EILSEQ    The wide-character code wc does not correspond to a valid
               character.

RESULT
     Upon successful completion, the fputws() function returns a non-nega-
     tive number. Otherwise it returns -1, sets an error indicator for the
     stream and errno is set to indicate the error.

SEE ALSO
     fopen(3S), lfs(5), stdio(5), wchar(5).
























Page 2                       Reliant UNIX 5.44                Printed 11/98

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