summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/strtoul.c
diff options
context:
space:
mode:
authorpat <>2005-03-30 18:51:49 +0000
committerpat <>2005-03-30 18:51:49 +0000
commit894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (patch)
treef9fb8e9324f6cbdc10d72cab8b889d470252465a /src/lib/libc/stdlib/strtoul.c
parent162f8b042bf31ab94714a6f194e9836c08c085f5 (diff)
downloadopenbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.gz
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.tar.bz2
openbsd-894b6ab0099e7d9ca2ad9acb75246cd0a4542167.zip
ansi + de-register
ok otto deraadt
Diffstat (limited to '')
-rw-r--r--src/lib/libc/stdlib/strtoul.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/strtoul.c b/src/lib/libc/stdlib/strtoul.c
index 7d31ce79fb..1faa0abbd0 100644
--- a/src/lib/libc/stdlib/strtoul.c
+++ b/src/lib/libc/stdlib/strtoul.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
31static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp $"; 31static char *rcsid = "$OpenBSD: strtoul.c,v 1.6 2005/03/30 18:51:49 pat Exp $";
32#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
33 33
34#include <ctype.h> 34#include <ctype.h>
@@ -43,15 +43,12 @@ static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp
43 * alphabets and digits are each contiguous. 43 * alphabets and digits are each contiguous.
44 */ 44 */
45unsigned long 45unsigned long
46strtoul(nptr, endptr, base) 46strtoul(const char *nptr, char **endptr, int base)
47 const char *nptr;
48 char **endptr;
49 register int base;
50{ 47{
51 register const char *s; 48 const char *s;
52 register unsigned long acc, cutoff; 49 unsigned long acc, cutoff;
53 register int c; 50 int c;
54 register int neg, any, cutlim; 51 int neg, any, cutlim;
55 52
56 /* 53 /*
57 * See strtol for comments as to the logic used. 54 * See strtol for comments as to the logic used.