11.5Schristos/* $NetBSD: wcstof.c,v 1.5 2017/12/09 22:48:00 christos Exp $ */
21.1Stnozaki
31.1Stnozaki/*-
41.1Stnozaki * Copyright (c)2006 Citrus Project,
51.1Stnozaki * All rights reserved.
61.1Stnozaki *
71.1Stnozaki * Redistribution and use in source and binary forms, with or without
81.1Stnozaki * modification, are permitted provided that the following conditions
91.1Stnozaki * are met:
101.1Stnozaki * 1. Redistributions of source code must retain the above copyright
111.1Stnozaki *    notice, this list of conditions and the following disclaimer.
121.1Stnozaki * 2. Redistributions in binary form must reproduce the above copyright
131.1Stnozaki *    notice, this list of conditions and the following disclaimer in the
141.1Stnozaki *    documentation and/or other materials provided with the distribution.
151.1Stnozaki *
161.1Stnozaki * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
171.1Stnozaki * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
181.1Stnozaki * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
191.1Stnozaki * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
201.1Stnozaki * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
211.1Stnozaki * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
221.1Stnozaki * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
231.1Stnozaki * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
241.1Stnozaki * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
251.1Stnozaki * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261.1Stnozaki * SUCH DAMAGE.
271.1Stnozaki */
281.1Stnozaki
291.1Stnozaki#include <sys/cdefs.h>
301.1Stnozaki#if defined(LIBC_SCCS) && !defined(lint)
311.5Schristos__RCSID("$NetBSD: wcstof.c,v 1.5 2017/12/09 22:48:00 christos Exp $");
321.1Stnozaki#endif /* LIBC_SCCS and not lint */
331.1Stnozaki
341.1Stnozaki#include "namespace.h"
351.1Stnozaki
361.1Stnozaki#include <assert.h>
371.1Stnozaki#include <errno.h>
381.1Stnozaki#include <math.h>
391.1Stnozaki#include <stdlib.h>
401.1Stnozaki#include <string.h>
411.1Stnozaki#include <wchar.h>
421.1Stnozaki#include <wctype.h>
431.1Stnozaki
441.1Stnozaki__weak_alias(wcstof,_wcstof)
451.5Schristos__weak_alias(wcstof_l,_wcstof_l)
461.1Stnozaki
471.1Stnozaki#define _FUNCNAME	wcstof
481.1Stnozaki#define _RETURN_TYPE	float
491.4Sjoerg#define _STRTOD_FUNC	strtof_l
501.1Stnozaki
511.1Stnozaki#include "_wcstod.h"
52