From: Paul Eggert Date: Thu, 1 Sep 2005 19:41:07 +0000 (+0000) Subject: Use bool where appropriate. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e5cfc92d3a783d911169d1704ae6e37072c327c;hp=1e5cfc92d3a783d911169d1704ae6e37072c327c;p=pspp Use bool where appropriate. * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int. All callers changed. (calc_eclosure_iter): Likewise, for ROOT arg. (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg. (build_charclass_op): Likewise, for NON_MATCH arg. * lib/regex_internal.c (re_string_allocate, re_string_construct): (re_string_construct_common): Likewise, for ICASE arg. * lib/regexec.c (re_search_2_stub, re_search_stub): Likewise, for RET_LEN arg. (check_matching): Likewise, for FL_LONGEST_MATCH arg. (set_regs): Likewise, for FL_BACKTRACK arg. * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8): (duplicate_node_closure, calc_inveclosure, calc_eclosure): (calc_eclosure_iter, parse_bracket_exp): Use bool for internal variables that are booleans. * lib/regexec.c (re_search_internal, check_matching): (proceed_next_node): (set_regs, build_sifted_states, sift_states_bkref): (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub): (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates): (find_collation_sequence_value): Likewise. * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last): (re_node_set_compare): Return bool, not int. All callers changed. * lib/regexec.c (check_halt_node_context, check_dst_limits): (build_trtable, check_node_accept): Likewise. * lib/regex_internal.h: Include stdbool.h. Fix bugs uncovered when converting to bool. * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation failure instead of charging ahead blindly. * lib/regex_internal.c (register_state): Likewise. * lib/regexec.c (re_search_2_stub): Use simpler method than boolean for freeing internal storage. (group_nodes_into_DFA_states): Use unsigned int, not int, for bitset pieces used as boolean, to avoid undefined behavior on hosts that do int overflow checking. * config/srclist.txt: Add glibc bug 1285. ---