gnats-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to gnats/libiberty/strtod.c


From: Milan Zamazal
Subject: Changes to gnats/libiberty/strtod.c
Date: Mon, 10 Dec 2001 18:04:31 -0500

Index: gnats/libiberty/strtod.c
diff -c gnats/libiberty/strtod.c:1.1 gnats/libiberty/strtod.c:1.2
*** gnats/libiberty/strtod.c:1.1        Thu Nov  5 14:54:16 1998
--- gnats/libiberty/strtod.c    Mon Dec 10 18:03:26 2001
***************
*** 22,28 ****
  This exception does not however invalidate any other reasons why
  the executable file might be covered by the GNU General Public License. */
  
! #include <ctype.h>
  
  extern double atof ();
  
--- 22,29 ----
  This exception does not however invalidate any other reasons why
  the executable file might be covered by the GNU General Public License. */
  
! #include "ansidecl.h"
! #include "safe-ctype.h"
  
  extern double atof ();
  
***************
*** 42,48 ****
    
    p = str;
    
!   while (isspace (*p))
      ++p;
    
    if (*p == '+' || *p == '-')
--- 43,49 ----
    
    p = str;
    
!   while (ISSPACE (*p))
      ++p;
    
    if (*p == '+' || *p == '-')
***************
*** 88,97 ****
      }
  
    /* digits, with 0 or 1 periods in it.  */
!   if (isdigit (*p) || *p == '.')
      {
        int got_dot = 0;
!       while (isdigit (*p) || (!got_dot && *p == '.'))
        {
          if (*p == '.')
            got_dot = 1;
--- 89,98 ----
      }
  
    /* digits, with 0 or 1 periods in it.  */
!   if (ISDIGIT (*p) || *p == '.')
      {
        int got_dot = 0;
!       while (ISDIGIT (*p) || (!got_dot && *p == '.'))
        {
          if (*p == '.')
            got_dot = 1;
***************
*** 105,113 ****
          i = 1;
          if (p[i] == '+' || p[i] == '-')
            ++i;
!         if (isdigit (p[i]))
            {
!             while (isdigit (p[i]))
                ++i;
              *ptr = p + i;
              return atof (str);
--- 106,114 ----
          i = 1;
          if (p[i] == '+' || p[i] == '-')
            ++i;
!         if (ISDIGIT (p[i]))
            {
!             while (ISDIGIT (p[i]))
                ++i;
              *ptr = p + i;
              return atof (str);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]