1*87ad8af4Schristos /* $NetBSD: wcstof.c,v 1.5 2017/12/09 22:48:00 christos Exp $ */ 2f9de1ba5Stnozaki 3f9de1ba5Stnozaki /*- 4f9de1ba5Stnozaki * Copyright (c)2006 Citrus Project, 5f9de1ba5Stnozaki * All rights reserved. 6f9de1ba5Stnozaki * 7f9de1ba5Stnozaki * Redistribution and use in source and binary forms, with or without 8f9de1ba5Stnozaki * modification, are permitted provided that the following conditions 9f9de1ba5Stnozaki * are met: 10f9de1ba5Stnozaki * 1. Redistributions of source code must retain the above copyright 11f9de1ba5Stnozaki * notice, this list of conditions and the following disclaimer. 12f9de1ba5Stnozaki * 2. Redistributions in binary form must reproduce the above copyright 13f9de1ba5Stnozaki * notice, this list of conditions and the following disclaimer in the 14f9de1ba5Stnozaki * documentation and/or other materials provided with the distribution. 15f9de1ba5Stnozaki * 16f9de1ba5Stnozaki * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17f9de1ba5Stnozaki * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18f9de1ba5Stnozaki * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19f9de1ba5Stnozaki * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20f9de1ba5Stnozaki * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21f9de1ba5Stnozaki * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22f9de1ba5Stnozaki * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23f9de1ba5Stnozaki * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24f9de1ba5Stnozaki * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25f9de1ba5Stnozaki * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26f9de1ba5Stnozaki * SUCH DAMAGE. 27f9de1ba5Stnozaki */ 28f9de1ba5Stnozaki 29f9de1ba5Stnozaki #include <sys/cdefs.h> 30f9de1ba5Stnozaki #if defined(LIBC_SCCS) && !defined(lint) 31*87ad8af4Schristos __RCSID("$NetBSD: wcstof.c,v 1.5 2017/12/09 22:48:00 christos Exp $"); 32f9de1ba5Stnozaki #endif /* LIBC_SCCS and not lint */ 33f9de1ba5Stnozaki 34f9de1ba5Stnozaki #include "namespace.h" 35f9de1ba5Stnozaki 36f9de1ba5Stnozaki #include <assert.h> 37f9de1ba5Stnozaki #include <errno.h> 38f9de1ba5Stnozaki #include <math.h> 39f9de1ba5Stnozaki #include <stdlib.h> 40f9de1ba5Stnozaki #include <string.h> 41f9de1ba5Stnozaki #include <wchar.h> 42f9de1ba5Stnozaki #include <wctype.h> 43f9de1ba5Stnozaki 44f9de1ba5Stnozaki __weak_alias(wcstof,_wcstof) 45*87ad8af4Schristos __weak_alias(wcstof_l,_wcstof_l) 46f9de1ba5Stnozaki 47f9de1ba5Stnozaki #define _FUNCNAME wcstof 48f9de1ba5Stnozaki #define _RETURN_TYPE float 499a7fa6ffSjoerg #define _STRTOD_FUNC strtof_l 50f9de1ba5Stnozaki 51f9de1ba5Stnozaki #include "_wcstod.h" 52