diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-11-25 21:54:48 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-11-25 21:54:48 +0200 |
commit | 9a9ff61bbd952c1263b55f82a269da5b09289a6b (patch) | |
tree | 4bc31b31d0bec6d27f77e55f1a88f50534fa6ed4 /missing_d/strtoul.c | |
parent | dbabe5a569ad82a9faeb2f121e387ec6399f9dcb (diff) | |
parent | 7af1da783175273a26609911c3a95975ed0f5c13 (diff) | |
download | egawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.tar.gz egawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.tar.bz2 egawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.zip |
Merge branch 'master' into array-iface
Diffstat (limited to 'missing_d/strtoul.c')
-rw-r--r-- | missing_d/strtoul.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/missing_d/strtoul.c b/missing_d/strtoul.c index d2655750..cdd7cf14 100644 --- a/missing_d/strtoul.c +++ b/missing_d/strtoul.c @@ -14,8 +14,6 @@ #include <string.h> #include <errno.h> #include <limits.h> -#define TRUE 1 -#define FALSE 0 #define strtoul mystrtoul #endif @@ -33,10 +31,10 @@ int base; unsigned long result = 0UL; char *nptr_orig = (char *) nptr; - int neg = FALSE; + bool neg = false; char *cp, c; int val; - int sawdigs = FALSE; + bool sawdigs = false; /* * The strtoul() function converts the initial part of the @@ -64,7 +62,7 @@ int base; nptr++; else if (*nptr == '-') { nptr++; - neg = TRUE; + neg = true; } /* @@ -110,7 +108,7 @@ int base; goto out; result *= base; result += val; - sawdigs = TRUE; + sawdigs = true; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': @@ -133,7 +131,7 @@ int base; goto out; result *= base; result += val; - sawdigs = TRUE; + sawdigs = true; break; default: goto out; |