(ndigits may be negative). */
double
-dtoa_strtod (const char *s, int *error)
+dtoa_strtod (const char *s, bool *error)
{
char *endp;
double d;
if (endp != NULL && (*endp == '\0'))
*error = (errno != 0);
else
- *error = TRUE;
+ *error = true;
return d;
}
(ndigits may be negative). */
long double
-ldtoa_strtold (const char *s, int *error)
+ldtoa_strtold (const char *s, bool *error)
{
char *endp;
long double d;
if (endp != NULL && (*endp == '\0'))
*error = (errno != 0);
else
- *error = TRUE;
+ *error = true;
return d;
}
#define NULL (void *)0
#endif
-#if !defined(TRUE)
-#define TRUE (1 == 1)
-#endif
-#if !defined(FALSE)
-#define FALSE (1 == 0)
-#endif
-
#if defined(HAVE_STDLIB_H)
#if !defined(_ISOC99_SOURCE)
#define _ISOC99_SOURCE
contain ndigits past the decimal point (ndigits may be negative). */
extern "C" double
-EXPORT(strtod) (const char *s, int *error)
+EXPORT(strtod) (const char *s, bool *error)
{
char *endp;
double d;
#if defined(HAVE_ERRNO_H)
*error = (errno != 0);
#else
- *error = FALSE;
+ *error = false;
#endif
else
- *error = TRUE;
+ *error = true;
return d;
}
#define NULL (void *)0
#endif
-#if !defined(TRUE)
-#define TRUE (1 == 1)
-#endif
-#if !defined(FALSE)
-#define FALSE (1 == 0)
-#endif
-
#define MAX_FP_DIGITS 500
typedef enum Mode { maxsignicant, decimaldigits } Mode;
contain ndigits past the decimal point (ndigits may be negative). */
extern "C" long double
-EXPORT(strtold) (const char *s, int *error)
+EXPORT(strtold) (const char *s, bool *error)
{
char *endp;
long double d;
#if defined(HAVE_ERRNO_H)
*error = (errno != 0);
#else
- *error = FALSE;
+ *error = false;
#endif
else
- *error = TRUE;
+ *error = true;
return d;
}