Use C99-style bool instead of our own style.

This commit is contained in:
Paul Eggert
2002-10-22 04:46:28 +00:00
parent 738c69de37
commit 8307162d58
5 changed files with 21 additions and 21 deletions

View File

@@ -450,7 +450,7 @@ conflict_report_yacc (int src_num, int rrc_num)
void
conflicts_output (FILE *out)
{
bool printed_sth = FALSE;
bool printed_sth = false;
state_number_t i;
for (i = 0; i < nstates; i++)
{
@@ -460,8 +460,8 @@ conflicts_output (FILE *out)
fprintf (out, _("State %d contains "), i);
fprintf (out, "%s.\n",
conflict_report (count_sr_conflicts (s),
count_rr_conflicts (s, TRUE)));
printed_sth = TRUE;
count_rr_conflicts (s, true)));
printed_sth = true;
}
}
if (printed_sth)
@@ -487,7 +487,7 @@ conflicts_total_count (void)
if (conflicts[i])
{
count += count_sr_conflicts (states[i]);
count += count_rr_conflicts (states[i], FALSE);
count += count_rr_conflicts (states[i], false);
}
return count;
}
@@ -516,7 +516,7 @@ conflicts_print (void)
if (conflicts[i])
{
src_total += count_sr_conflicts (states[i]);
rrc_total += count_rr_conflicts (states[i], TRUE);
rrc_total += count_rr_conflicts (states[i], true);
}
}

View File

@@ -366,7 +366,7 @@ print_reductions (FILE *out, state_t *state)
if (redp->rules[j] != default_rule)
print_reduction (out, width,
symbols[i]->tag,
redp->rules[j], TRUE);
redp->rules[j], true);
else
defaulted = 1;
count++;
@@ -376,18 +376,18 @@ print_reductions (FILE *out, state_t *state)
if (defaulted)
print_reduction (out, width,
symbols[i]->tag,
default_rule, TRUE);
default_rule, true);
defaulted = 0;
print_reduction (out, width,
symbols[i]->tag,
redp->rules[j], FALSE);
redp->rules[j], false);
}
}
}
if (default_rule)
print_reduction (out, width,
_("$default"), default_rule, TRUE);
_("$default"), default_rule, true);
}
@@ -400,11 +400,11 @@ static void
print_actions (FILE *out, state_t *state)
{
/* Print shifts. */
print_transitions (state, out, TRUE);
print_transitions (state, out, true);
print_errs (out, state);
print_reductions (out, state);
/* Print gotos. */
print_transitions (state, out, FALSE);
print_transitions (state, out, false);
}

View File

@@ -71,8 +71,8 @@ useful_production (rule_number_t r, bitset N0)
for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
if (ISVAR (*rhsp) && !bitset_test (N0, *rhsp - ntokens))
return FALSE;
return TRUE;
return false;
return true;
}
@@ -353,14 +353,14 @@ reduce_output (FILE *out)
}
{
bool b = FALSE;
bool b = false;
int i;
for (i = 0; i < ntokens; i++)
if (!bitset_test (V, i) && !bitset_test (V1, i))
{
if (!b)
fprintf (out, "%s\n\n", _("Terminals which are not used"));
b = TRUE;
b = true;
fprintf (out, " %s\n", symbols[i]->tag);
}
if (b)

View File

@@ -266,13 +266,13 @@ state_compare (const state_t *s1, const state_t *s2)
int i;
if (s1->nitems != s2->nitems)
return FALSE;
return false;
for (i = 0; i < s1->nitems; ++i)
if (s1->items[i] != s2->items[i])
return FALSE;
return false;
return TRUE;
return true;
}
static unsigned int

View File

@@ -418,7 +418,7 @@ token_actions (void)
/* Find the rules which are reduced. */
if (!glr_parser)
for (r = 0; r < nrules; ++r)
rules[r].useful = FALSE;
rules[r].useful = false;
for (i = 0; i < nstates; ++i)
{
@@ -433,9 +433,9 @@ token_actions (void)
{
for (j = 0; j < ntokens; ++j)
if (actrow[j] < 0 && actrow[j] != ACTION_MIN)
rules[item_number_as_rule_number (actrow[j])].useful = TRUE;
rules[item_number_as_rule_number (actrow[j])].useful = true;
if (yydefact[i])
rules[yydefact[i] - 1].useful = TRUE;
rules[yydefact[i] - 1].useful = true;
}
}