summaryrefslogtreecommitdiff
path: root/missing_d
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-09-13 17:27:53 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-09-13 17:27:53 +0300
commit99290f5ca37cb905f7f1dab9be416b2e2057d243 (patch)
treeb8b337622f6f06293fed652cf93e39ab67a60a75 /missing_d
parentc2db2b9ff8465cb5044e6f22beb229336479be57 (diff)
downloadgawk-99290f5ca37cb905f7f1dab9be416b2e2057d243.tar.gz
z/OS changes from Dave Pitts and Arnold.
Diffstat (limited to 'missing_d')
-rw-r--r--missing_d/ChangeLog4
-rw-r--r--missing_d/snprintf.c4
-rw-r--r--missing_d/strtoul.c12
3 files changed, 11 insertions, 9 deletions
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index ff29a926..cb797470 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-13 Arnold D. Robbins <arnold@skeeve.com>
+
+ * snprintf.c, strtoul.c: Remove TRUE/FALSE in favor of true/false.
+
2012-05-04 Arnold D. Robbins <arnold@skeeve.com>
* snprintf.c [DJGPP]: Change to __DJGPP__.
diff --git a/missing_d/snprintf.c b/missing_d/snprintf.c
index 12e50925..6cee2bed 100644
--- a/missing_d/snprintf.c
+++ b/missing_d/snprintf.c
@@ -53,14 +53,14 @@ static void close_safe_f()
static FILE *
safe_tmpfile (void)
{
- static short first = TRUE;
+ static bool first = true;
static const char template[] = "snprintfXXXXXX";
int fd;
static char *tmpdir = NULL;
static int len = 0;
if (first) {
- first = FALSE;
+ first = false;
/*
* First try Unix stanadard env var, then Windows var,
* then fall back to /tmp.
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;