[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to gnats/libiberty/strtol.c
From: |
Milan Zamazal |
Subject: |
Changes to gnats/libiberty/strtol.c |
Date: |
Mon, 10 Dec 2001 18:04:32 -0500 |
Index: gnats/libiberty/strtol.c
diff -c gnats/libiberty/strtol.c:1.2 gnats/libiberty/strtol.c:1.3
*** gnats/libiberty/strtol.c:1.2 Tue Oct 26 03:10:16 1999
--- gnats/libiberty/strtol.c Mon Dec 10 18:03:26 2001
***************
*** 10,19 ****
* 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.
! * 3. All advertising materials mentioning features or use of this software
! * must display the following acknowledgement:
! * This product includes software developed by the University of
! * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
--- 10,16 ----
* 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.
! * 3. [rescinded 22 July 1999]
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
***************
*** 31,43 ****
* SUCH DAMAGE.
*/
#include <limits.h>
! #include <ctype.h>
#include <errno.h>
! #if 0
! #include <stdlib.h>
#endif
! #include "ansidecl.h"
/* FIXME: It'd be nice to configure around these, but the include files are
too
painful. These macros should at least be more portable than hardwired hex
--- 28,47 ----
* SUCH DAMAGE.
*/
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+ #ifdef HAVE_LIMITS_H
#include <limits.h>
! #endif
! #ifdef HAVE_SYS_PARAM_H
! #include <sys/param.h>
! #endif
#include <errno.h>
! #ifdef NEED_DECLARATION_ERRNO
! extern int errno;
#endif
! #include "safe-ctype.h"
/* FIXME: It'd be nice to configure around these, but the include files are
too
painful. These macros should at least be more portable than hardwired hex
***************
*** 80,86 ****
*/
do {
c = *s++;
! } while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
--- 84,90 ----
*/
do {
c = *s++;
! } while (ISSPACE(c));
if (c == '-') {
neg = 1;
c = *s++;
***************
*** 116,125 ****
cutlim = cutoff % (unsigned long)base;
cutoff /= (unsigned long)base;
for (acc = 0, any = 0;; c = *s++) {
! if (isdigit(c))
c -= '0';
! else if (isalpha(c))
! c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
--- 120,129 ----
cutlim = cutoff % (unsigned long)base;
cutoff /= (unsigned long)base;
for (acc = 0, any = 0;; c = *s++) {
! if (ISDIGIT(c))
c -= '0';
! else if (ISALPHA(c))
! c -= ISUPPER(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to gnats/libiberty/strtol.c,
Milan Zamazal <=