2003-01-18 13:52:16 +03:00
|
|
|
.\" $NetBSD: fwide.3,v 1.4 2003/01/18 11:29:54 thorpej Exp $
|
2001-12-07 14:47:40 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c)2001 Citrus Project,
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $Citrus: xpg4dl/FreeBSD/lib/libc/stdio/fwide.3,v 1.2 2001/12/07 04:47:08 yamt Exp $
|
|
|
|
.\"
|
|
|
|
.Dd October 24, 2001
|
|
|
|
.Dt FWIDE 3
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fwide
|
2001-12-07 15:35:13 +03:00
|
|
|
.Nd get/set orientation of a stream
|
2001-12-07 14:47:40 +03:00
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libc
|
|
|
|
.Sh SYNOPSIS
|
2002-02-07 10:00:09 +03:00
|
|
|
.Fd #include \*[Lt]stdio.h\*[Gt]
|
|
|
|
.Fd #include \*[Lt]wchar.h\*[Gt]
|
2001-12-07 14:47:40 +03:00
|
|
|
.Ft int
|
|
|
|
.Fn fwide "FILE *stream" "int mode"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Fn fwide
|
|
|
|
function
|
2001-12-07 15:35:13 +03:00
|
|
|
determines the orientation of the stream pointed at by
|
2001-12-07 14:47:40 +03:00
|
|
|
.Fa stream .
|
|
|
|
.Pp
|
2001-12-07 15:35:13 +03:00
|
|
|
If the orientation of
|
|
|
|
.Fa stream
|
|
|
|
has already been determined,
|
2001-12-07 14:47:40 +03:00
|
|
|
.Fn fwide
|
|
|
|
leaves it unchanged.
|
|
|
|
Otherwise,
|
|
|
|
.Fn fwide
|
2001-12-07 15:35:13 +03:00
|
|
|
sets the orientation of
|
|
|
|
.Fa stream
|
|
|
|
according to
|
2001-12-07 14:47:40 +03:00
|
|
|
.Fa mode .
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Fa mode
|
2001-12-07 15:35:13 +03:00
|
|
|
is less than zero,
|
|
|
|
.Fa stream
|
|
|
|
is set to byte-oriented.
|
|
|
|
If it is greater than zero,
|
|
|
|
.Fa stream
|
|
|
|
is set to wide-oriented.
|
2001-12-07 14:47:40 +03:00
|
|
|
Otherwise,
|
|
|
|
.Fa mode
|
2001-12-07 15:35:13 +03:00
|
|
|
is zero, and
|
|
|
|
.Fa stream
|
|
|
|
is unchanged.
|
2001-12-07 14:47:40 +03:00
|
|
|
.Sh RETURN VALUES
|
|
|
|
.Fn fwide
|
|
|
|
returns a value according to orientation after the call of
|
2001-12-07 15:35:13 +03:00
|
|
|
.Fn fwide ;
|
2001-12-07 14:47:40 +03:00
|
|
|
a value less than zero if byte-oriented, a value greater than zero
|
2001-12-07 15:35:13 +03:00
|
|
|
if wide-oriented, and zero if the stream has no orientation.
|
2001-12-07 14:47:40 +03:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ferror 3 ,
|
|
|
|
.Xr fgetc 3 ,
|
|
|
|
.Xr fgetwc 3 ,
|
|
|
|
.Xr fopen 3 ,
|
|
|
|
.Xr fputc 3 ,
|
|
|
|
.Xr fputwc 3 ,
|
|
|
|
.Xr freopen 3 ,
|
|
|
|
.Xr stdio 3
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Fn fwide
|
|
|
|
function
|
2001-12-07 15:35:13 +03:00
|
|
|
conforms to
|
2001-12-07 14:47:40 +03:00
|
|
|
.St -isoC99 .
|