xref: /freebsd/lib/libc/stdio/getwc.3 (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
101533af5STim J. Robbins.\"	$NetBSD: getwc.3,v 1.3 2002/02/07 07:00:26 ross Exp $
201533af5STim J. Robbins.\"
301533af5STim J. Robbins.\" Copyright (c) 1990, 1991, 1993
401533af5STim J. Robbins.\"	The Regents of the University of California.  All rights reserved.
501533af5STim J. Robbins.\"
601533af5STim J. Robbins.\" This code is derived from software contributed to Berkeley by
701533af5STim J. Robbins.\" Chris Torek and the American National Standards Committee X3,
801533af5STim J. Robbins.\" on Information Processing Systems.
901533af5STim J. Robbins.\"
1001533af5STim J. Robbins.\" Redistribution and use in source and binary forms, with or without
1101533af5STim J. Robbins.\" modification, are permitted provided that the following conditions
1201533af5STim J. Robbins.\" are met:
1301533af5STim J. Robbins.\" 1. Redistributions of source code must retain the above copyright
1401533af5STim J. Robbins.\"    notice, this list of conditions and the following disclaimer.
1501533af5STim J. Robbins.\" 2. Redistributions in binary form must reproduce the above copyright
1601533af5STim J. Robbins.\"    notice, this list of conditions and the following disclaimer in the
1701533af5STim J. Robbins.\"    documentation and/or other materials provided with the distribution.
18fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
1901533af5STim J. Robbins.\"    may be used to endorse or promote products derived from this software
2001533af5STim J. Robbins.\"    without specific prior written permission.
2101533af5STim J. Robbins.\"
2201533af5STim J. Robbins.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2301533af5STim J. Robbins.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2401533af5STim J. Robbins.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2501533af5STim J. Robbins.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2601533af5STim J. Robbins.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2701533af5STim J. Robbins.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2801533af5STim J. Robbins.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2901533af5STim J. Robbins.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3001533af5STim J. Robbins.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3101533af5STim J. Robbins.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3201533af5STim J. Robbins.\" SUCH DAMAGE.
3301533af5STim J. Robbins.\"
3434d72a66STim J. Robbins.Dd March 3, 2004
3501533af5STim J. Robbins.Dt GETWC 3
3601533af5STim J. Robbins.Os
3701533af5STim J. Robbins.Sh NAME
3801533af5STim J. Robbins.Nm fgetwc ,
3901533af5STim J. Robbins.Nm getwc ,
40898f520dSRuslan Ermilov.Nm getwchar
4134d72a66STim J. Robbins.Nd get next wide character from input stream
4201533af5STim J. Robbins.Sh LIBRARY
4301533af5STim J. Robbins.Lb libc
4401533af5STim J. Robbins.Sh SYNOPSIS
4546624699STim J. Robbins.In stdio.h
4646624699STim J. Robbins.In wchar.h
4701533af5STim J. Robbins.Ft wint_t
4801533af5STim J. Robbins.Fn fgetwc "FILE *stream"
4901533af5STim J. Robbins.Ft wint_t
5001533af5STim J. Robbins.Fn getwc "FILE *stream"
5101533af5STim J. Robbins.Ft wint_t
528b799088SRuslan Ermilov.Fn getwchar void
5301533af5STim J. Robbins.Sh DESCRIPTION
5401533af5STim J. RobbinsThe
5501533af5STim J. Robbins.Fn fgetwc
5601533af5STim J. Robbinsfunction
5734d72a66STim J. Robbinsobtains the next input wide character (if present) from the stream pointed at by
5801533af5STim J. Robbins.Fa stream ,
5901533af5STim J. Robbinsor the next character pushed back on the stream via
6001533af5STim J. Robbins.Xr ungetwc 3 .
6101533af5STim J. Robbins.Pp
6201533af5STim J. RobbinsThe
6301533af5STim J. Robbins.Fn getwc
6401533af5STim J. Robbinsfunction
6501533af5STim J. Robbinsacts essentially identically to
66ce04c110STim J. Robbins.Fn fgetwc .
6701533af5STim J. Robbins.Pp
6801533af5STim J. RobbinsThe
6901533af5STim J. Robbins.Fn getwchar
7001533af5STim J. Robbinsfunction
7101533af5STim J. Robbinsis equivalent to
7201533af5STim J. Robbins.Fn getwc
73898f520dSRuslan Ermilovwith the argument
74ae828962SRuslan Ermilov.Dv stdin .
7501533af5STim J. Robbins.Sh RETURN VALUES
7634d72a66STim J. RobbinsIf successful, these routines return the next wide character
7701533af5STim J. Robbinsfrom the
7801533af5STim J. Robbins.Fa stream .
7901533af5STim J. RobbinsIf the stream is at end-of-file or a read error occurs,
8001533af5STim J. Robbinsthe routines return
8101533af5STim J. Robbins.Dv WEOF .
8201533af5STim J. RobbinsThe routines
8301533af5STim J. Robbins.Xr feof 3
8401533af5STim J. Robbinsand
8501533af5STim J. Robbins.Xr ferror 3
8601533af5STim J. Robbinsmust be used to distinguish between end-of-file and error.
8701533af5STim J. RobbinsIf an error occurs, the global variable
8801533af5STim J. Robbins.Va errno
8901533af5STim J. Robbinsis set to indicate the error.
9001533af5STim J. RobbinsThe end-of-file condition is remembered, even on a terminal, and all
9101533af5STim J. Robbinssubsequent attempts to read will return
9201533af5STim J. Robbins.Dv WEOF
9301533af5STim J. Robbinsuntil the condition is cleared with
9401533af5STim J. Robbins.Xr clearerr 3 .
9501533af5STim J. Robbins.Sh SEE ALSO
9601533af5STim J. Robbins.Xr ferror 3 ,
9701533af5STim J. Robbins.Xr fopen 3 ,
9801533af5STim J. Robbins.Xr fread 3 ,
99ce04c110STim J. Robbins.Xr getc 3 ,
10001533af5STim J. Robbins.Xr putwc 3 ,
10101533af5STim J. Robbins.Xr stdio 3 ,
10201533af5STim J. Robbins.Xr ungetwc 3
10301533af5STim J. Robbins.Sh STANDARDS
10401533af5STim J. RobbinsThe
10501533af5STim J. Robbins.Fn fgetwc ,
10601533af5STim J. Robbins.Fn getwc
10701533af5STim J. Robbinsand
10801533af5STim J. Robbins.Fn getwchar
10901533af5STim J. Robbinsfunctions
11001533af5STim J. Robbinsconform to
11146624699STim J. Robbins.St -isoC-99 .
112*53101323SWarner Losh.Sh HISTORY
113*53101323SWarner LoshA version of the
114*53101323SWarner Losh.Fn getc
115*53101323SWarner Loshand
116*53101323SWarner Losh.Fn getw
117*53101323SWarner Loshfunctions appeared in
118*53101323SWarner Losh.At v1 .
119