summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-11-10 16:48:10 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-11-10 16:48:10 +1100
commitf5ebfe9f68ab32adaa1d5ac3418eba838fed5f92 (patch)
treee307d17c0db16fd1df27e8f6fc69c5d60bd98f2e
parentf976e6f883879a3749d79dc64d3f8513095ee9e0 (diff)
- (dtucker) [openbsd-compat/strtoul.c] Update from OpenBSD 1.5 -> 1.7.
-rw-r--r--ChangeLog4
-rw-r--r--openbsd-compat/strtoul.c18
2 files changed, 8 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 570773f7e..94515aaf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,7 +24,7 @@
24 - (dtucker) [openbsd-compat/basename.c] Update from OpenBSD 1.11 -> 1.14. 24 - (dtucker) [openbsd-compat/basename.c] Update from OpenBSD 1.11 -> 1.14.
25 Removal of rcsid, will no longer strlcpy parts of the string. 25 Removal of rcsid, will no longer strlcpy parts of the string.
26 - (dtucker) [openbsd-compat/strtoll.c] Update from OpenBSD 1.4 -> 1.5. 26 - (dtucker) [openbsd-compat/strtoll.c] Update from OpenBSD 1.4 -> 1.5.
27 Removal of rcsid. 27 - (dtucker) [openbsd-compat/strtoul.c] Update from OpenBSD 1.5 -> 1.7.
28 28
2920051105 2920051105
30 - (djm) OpenBSD CVS Sync 30 - (djm) OpenBSD CVS Sync
@@ -3267,4 +3267,4 @@
3267 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3267 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3268 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3268 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3269 3269
3270$Id: ChangeLog,v 1.3967 2005/11/10 05:46:26 dtucker Exp $ 3270$Id: ChangeLog,v 1.3968 2005/11/10 05:48:10 dtucker Exp $
diff --git a/openbsd-compat/strtoul.c b/openbsd-compat/strtoul.c
index 7c093c48f..8219c8391 100644
--- a/openbsd-compat/strtoul.c
+++ b/openbsd-compat/strtoul.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: strtoul.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */
1/* 2/*
2 * Copyright (c) 1990 Regents of the University of California. 3 * Copyright (c) 1990 Regents of the University of California.
3 * All rights reserved. 4 * All rights reserved.
@@ -32,10 +33,6 @@
32#include "includes.h" 33#include "includes.h"
33#ifndef HAVE_STRTOUL 34#ifndef HAVE_STRTOUL
34 35
35#if defined(LIBC_SCCS) && !defined(lint)
36static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp $";
37#endif /* LIBC_SCCS and not lint */
38
39#include <ctype.h> 36#include <ctype.h>
40#include <errno.h> 37#include <errno.h>
41#include <limits.h> 38#include <limits.h>
@@ -48,15 +45,12 @@ static char *rcsid = "$OpenBSD: strtoul.c,v 1.5 2003/06/02 20:18:38 millert Exp
48 * alphabets and digits are each contiguous. 45 * alphabets and digits are each contiguous.
49 */ 46 */
50unsigned long 47unsigned long
51strtoul(nptr, endptr, base) 48strtoul(const char *nptr, char **endptr, int base)
52 const char *nptr;
53 char **endptr;
54 register int base;
55{ 49{
56 register const char *s; 50 const char *s;
57 register unsigned long acc, cutoff; 51 unsigned long acc, cutoff;
58 register int c; 52 int c;
59 register int neg, any, cutlim; 53 int neg, any, cutlim;
60 54
61 /* 55 /*
62 * See strtol for comments as to the logic used. 56 * See strtol for comments as to the logic used.