1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Start using bool.

This commit is contained in:
Bruno Haible
2002-11-19 12:55:48 +00:00
parent 4cda19576b
commit 2cd11405ed
15 changed files with 81 additions and 51 deletions

View File

@@ -168,7 +168,7 @@ Gen_Perf::hash (KeywordExt *key_node)
that all legal Asso_Values are visited without repetition since
Option.Get_Jump was forced to be an odd value! */
inline int
inline bool
Gen_Perf::affects_prev (char c, KeywordExt *curr)
{
int original_char = _asso_values[(unsigned char)c];
@@ -202,7 +202,7 @@ Gen_Perf::affects_prev (char c, KeywordExt *curr)
_fewest_collisions = collisions;
if (option[DEBUG])
fprintf (stderr, "- resolved after %d iterations", total_iterations - i);
return 0;
return false;
}
}
}
@@ -210,7 +210,7 @@ Gen_Perf::affects_prev (char c, KeywordExt *curr)
/* Restore original values, no more tries. */
_asso_values[(unsigned char)c] = original_char;
/* If we're this far it's time to try the next character.... */
return 1;
return true;
}
/* Change a character value, try least-used characters first. */