fwide(3)

fwide3

Get/set orientation of a stream

Usage

#include <stdio.h>

#include <wchar.h>

int

fwide(FILE *stream, int mode);

Library

Standard C Library (libc, -lc)

Overview

The fwide() function determines the orientation of the stream pointed at by stream.

If the orientation of stream has already been determined, fwide() leaves it unchanged. Otherwise, fwide() sets the orientation of stream according to mode.

If mode is less than zero, stream is set to be byte-oriented. If mode is greater than zero, stream is set to be wide-oriented. Otherwise, mode is zero, and stream is unchanged.

Return values

The fwide() function returns a value according to orientation after the call of fwide(); a value less than zero if byte-oriented, a value greater than zero if wide-oriented, and zero if the stream has no orientation.

Releases

145 releases since Mac OS X 10.3; the text changed 1 time.

  1. 10.3–10.4.11
  2. 10.5–26.5

Standards

The fwide() function conforms to ISO/IEC 9899:1999 (“ISO C99”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.