Skip to content

Latest commit

 

History

History
45 lines (40 loc) · 1.75 KB

strtol.c

File metadata and controls

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