Home | History | Annotate | Line # | Download | only in stdlib
strtoq.c revision 1.19.6.2
      1  1.19.6.2  joerg /* $NetBSD: strtoq.c,v 1.19.6.2 2008/08/20 12:42:27 joerg Exp $ */
      2  1.19.6.2  joerg 
      3  1.19.6.2  joerg /*-
      4  1.19.6.2  joerg  * Copyright (c) 2008 Joerg Sonnenberger <joerg (at) NetBSD.org>
      5  1.19.6.2  joerg  * All rights reserved.
      6  1.19.6.2  joerg  *
      7  1.19.6.2  joerg  * Redistribution and use in source and binary forms, with or without
      8  1.19.6.2  joerg  * modification, are permitted provided that the following conditions
      9  1.19.6.2  joerg  * are met:
     10  1.19.6.2  joerg  * 1. Redistributions of source code must retain the above copyright
     11  1.19.6.2  joerg  *    notice, this list of conditions and the following disclaimer.
     12  1.19.6.2  joerg  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.19.6.2  joerg  *    notice, this list of conditions and the following disclaimer in the
     14  1.19.6.2  joerg  *    documentation and/or other materials provided with the distribution.
     15  1.19.6.2  joerg  *
     16  1.19.6.2  joerg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     17  1.19.6.2  joerg  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     18  1.19.6.2  joerg  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     19  1.19.6.2  joerg  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     20  1.19.6.2  joerg  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21  1.19.6.2  joerg  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22  1.19.6.2  joerg  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  1.19.6.2  joerg  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24  1.19.6.2  joerg  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  1.19.6.2  joerg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  1.19.6.2  joerg  * SUCH DAMAGE.
     27  1.19.6.2  joerg  */
     28  1.19.6.2  joerg 
     29  1.19.6.2  joerg #include <sys/cdefs.h>
     30  1.19.6.2  joerg __RCSID("$NetBSD: strtoq.c,v 1.19.6.2 2008/08/20 12:42:27 joerg Exp $");
     31  1.19.6.2  joerg 
     32  1.19.6.2  joerg #include <assert.h>
     33  1.19.6.2  joerg #include <ctype.h>
     34  1.19.6.2  joerg #include <errno.h>
     35  1.19.6.2  joerg #include <limits.h>
     36  1.19.6.2  joerg #include <stdint.h>
     37  1.19.6.2  joerg #include <stdlib.h>
     38  1.19.6.2  joerg 
     39  1.19.6.2  joerg #define	_FUNCNAME	strtoq
     40  1.19.6.2  joerg #define	__INT		quad_t
     41  1.19.6.2  joerg #define	__INT_MIN	QUAD_MIN
     42  1.19.6.2  joerg #define	__INT_MAX	QUAD_MAX
     43  1.19.6.2  joerg 
     44  1.19.6.2  joerg #include "_strtol.h"
     45