xref: /netbsd-src/lib/libc/locale/wcstoumax.c (revision dafcd17c4911cb6642aa438986e20e9fe53ff9b6)
1*dafcd17cShubertf /*	$NetBSD: wcstoumax.c,v 1.3 2007/03/10 00:12:23 hubertf Exp $	*/
25e700978Sitojun 
35e700978Sitojun /*-
45e700978Sitojun  * Copyright (c)2003 Citrus Project,
55e700978Sitojun  * All rights reserved.
65e700978Sitojun  *
75e700978Sitojun  * Redistribution and use in source and binary forms, with or without
85e700978Sitojun  * modification, are permitted provided that the following conditions
95e700978Sitojun  * are met:
105e700978Sitojun  * 1. Redistributions of source code must retain the above copyright
115e700978Sitojun  *    notice, this list of conditions and the following disclaimer.
125e700978Sitojun  * 2. Redistributions in binary form must reproduce the above copyright
135e700978Sitojun  *    notice, this list of conditions and the following disclaimer in the
145e700978Sitojun  *    documentation and/or other materials provided with the distribution.
155e700978Sitojun  *
165e700978Sitojun  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
175e700978Sitojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
185e700978Sitojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
195e700978Sitojun  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
205e700978Sitojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
215e700978Sitojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
225e700978Sitojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
235e700978Sitojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
245e700978Sitojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
255e700978Sitojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
265e700978Sitojun  * SUCH DAMAGE.
275e700978Sitojun  */
283f9925f7Stshiozak 
293f9925f7Stshiozak #include <sys/cdefs.h>
303f9925f7Stshiozak #if defined(LIBC_SCCS) && !defined(lint)
31*dafcd17cShubertf __RCSID("$NetBSD: wcstoumax.c,v 1.3 2007/03/10 00:12:23 hubertf Exp $");
323f9925f7Stshiozak #endif /* LIBC_SCCS and not lint */
333f9925f7Stshiozak 
343f9925f7Stshiozak #include <assert.h>
353f9925f7Stshiozak #include <errno.h>
363f9925f7Stshiozak #include <inttypes.h>
373f9925f7Stshiozak #include <limits.h>
383f9925f7Stshiozak #include <stdlib.h>
393f9925f7Stshiozak #include <wchar.h>
403f9925f7Stshiozak #include <wctype.h>
413f9925f7Stshiozak 
423f9925f7Stshiozak #include "__wctoint.h"
433f9925f7Stshiozak 
443f9925f7Stshiozak #define	_FUNCNAME	wcstoumax
453f9925f7Stshiozak #define	__UINT		uintmax_t
463f9925f7Stshiozak #define	__UINT_MAX	UINTMAX_MAX
473f9925f7Stshiozak 
483f9925f7Stshiozak #include "_wcstoul.h"
49