aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/node.c b/node.c
index 8dbe68a9..ff593d22 100644
--- a/node.c
+++ b/node.c
@@ -120,7 +120,7 @@ r_force_number(NODE *n)
if (do_non_decimal_data) { /* main.c assures false if do_posix */
errno = 0;
- if (! do_traditional && get_numbase(cp, TRUE) != 10) {
+ if (! do_traditional && get_numbase(cp, true) != 10) {
n->numbr = nondec2awknum(cp, cpend - cp);
n->flags |= NUMCUR;
ptr = cpend;
@@ -564,10 +564,10 @@ parse_escape(const char **string_ptr)
return i;
case 'x':
if (do_lint) {
- static short warned = FALSE;
+ static bool warned = false;
if (! warned) {
- warned = TRUE;
+ warned = true;
lintwarn(_("POSIX does not allow `\\x' escapes"));
}
}
@@ -603,13 +603,13 @@ parse_escape(const char **string_ptr)
return c;
default:
{
- static short warned[256];
+ static bool warned[256];
unsigned char uc = (unsigned char) c;
/* N.B.: use unsigned char here to avoid Latin-1 problems */
if (! warned[uc]) {
- warned[uc] = TRUE;
+ warned[uc] = true;
warning(_("escape sequence `\\%c' treated as plain `%c'"), uc, uc);
}
@@ -621,7 +621,7 @@ parse_escape(const char **string_ptr)
/* get_numbase --- return the base to use for the number in 's' */
int
-get_numbase(const char *s, int use_locale)
+get_numbase(const char *s, bool use_locale)
{
int dec_point = '.';
const char *str = s;
@@ -672,7 +672,7 @@ str2wstr(NODE *n, size_t **ptr)
char *sp;
mbstate_t mbs;
wchar_t wc, *wsp;
- static short warned = FALSE;
+ static bool warned = false;
assert((n->flags & (STRING|STRCUR)) != 0);
@@ -755,7 +755,7 @@ str2wstr(NODE *n, size_t **ptr)
memset(& mbs, 0, sizeof(mbs));
/* And warn the user something's wrong */
if (do_lint && ! warned) {
- warned = TRUE;
+ warned = true;
lintwarn(_("Invalid multibyte data detected. There may be a mismatch between your data and your locale."));
}
break;
@@ -936,7 +936,7 @@ is_ieee_magic_val(const char *val)
static AWKNUM
get_ieee_magic_val(const char *val)
{
- static short first = TRUE;
+ static bool first = true;
static AWKNUM inf;
static AWKNUM nan;
@@ -945,7 +945,7 @@ get_ieee_magic_val(const char *val)
if (val == ptr) { /* Older strtod implementations don't support inf or nan. */
if (first) {
- first = FALSE;
+ first = false;
nan = sqrt(-1.0);
inf = -log(0.0);
}