getwchar.c revision 104080
1132727Skan/*-
2132727Skan * Copyright (c) 2002 Tim J. Robbins.
318334Speter * All rights reserved.
4169699Skan *
5169699Skan * Redistribution and use in source and binary forms, with or without
6169699Skan * modification, are permitted provided that the following conditions
7132727Skan * are met:
890081Sobrien * 1. Redistributions of source code must retain the above copyright
918334Speter *    notice, this list of conditions and the following disclaimer.
1090081Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1118334Speter *    notice, this list of conditions and the following disclaimer in the
1218334Speter *    documentation and/or other materials provided with the distribution.
1318334Speter *
1418334Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1590081Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1618334Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1718334Speter * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1818334Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1918334Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2018334Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2190081Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22169699Skan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23169699Skan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2418334Speter * SUCH DAMAGE.
2518334Speter */
2618334Speter
2718334Speter#include <sys/cdefs.h>
2818334Speter__FBSDID("$FreeBSD: head/lib/libc/stdio/getwchar.c 104080 2002-09-28 07:43:44Z tjr $");
2918334Speter
3090081Sobrien#include "namespace.h"
31132727Skan#include <stdio.h>
32132727Skan#include <wchar.h>
33132727Skan#include "un-namespace.h"
3490081Sobrien#include "libc_private.h"
35132727Skan#include "local.h"
36132727Skan
37132727Skan/*
38132727Skan * Synonym for fgetwc(stdin).
39132727Skan */
40132727Skanwint_t
41132727Skangetwchar(void)
42132727Skan{
43132727Skan
44132727Skan	return (fgetwc(stdin));
45132727Skan}
4618334Speter