diff options
author | Colin Watson <cjwatson@debian.org> | 2019-02-04 13:16:40 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-02-04 13:16:41 +0000 |
commit | 7589519b4ca87bc9559765a52a302befefbe3f4a (patch) | |
tree | 6bf5b764212157b2a4824f6fa239228e6ec5a346 /libdb | |
parent | 74aa94f78dc7be7b5f97be5dd390dc74fc77cb8b (diff) |
Use bool for boolean command-line options
* include/manconfig.h.in (debug_level): Change type to bool. Update all
definitions and users.
* lib/encodings.c (get_roff_encoding): Change type of "found" to bool.
* libdb/db_lookup.c (dblookup_all, dblookup_exact): Change "match_case"
parameter type to bool. Update all callers.
(dblookup_pattern): Change "match_case", "pattern_regex", and
"try_descriptions" parameter types to bool. Update all callers.
* libdb/db_storage.h (dblookup_all, dblookup_exact, dblookup_pattern):
Update prototypes.
* src/descriptions_store.c (store_descriptions): Change types of
"found_real_page" and "found_external" to bool.
* src/lexgrog_test.c (main): Change types of "some_failed" and "found"
to bool.
* src/man.c (parse_opt): Change types of "apropos" and "whatis" to bool.
(add_roff_line_length): Change "save_cat_p" parameter type to bool *.
Update all callers.
(make_browser): Change "found_percent_s" type to bool.
(display): Change "display_to_stdout" type to bool.
(try_db): Change "found_stale" type to bool.
(local_man_loop): Change "local_mf" type to bool.
(main): Change "found_subpage" type to bool.
* src/manp.c (read_config_file): Change "optional" parameter type to
bool. Update all callers.
* src/manp.h (read_config_file): Update prototype.
* src/check_mandirs.c (opt_test, force_rescan): Change types to bool.
Update all users.
* src/globbing_test.c (match_case, regex_opt, wildcard): Likewise.
* src/lexgrog_test.c (parse_man, parse_cat, show_whatis, show_filters):
Likewise.
* src/man.c (disable_cache, troff, global_apropos, print_where,
print_where_cat, catman, local_man_file, findall, update, match_case,
regex_opt, wildcard, names_only, no_hyphenation, no_justification,
subpages, ascii, save_cat, ditroff, htmlout): Likewise.
* src/mandb.c (opt_test, force_rescan, check_for_strays, purge, user,
create): Likewise.
* src/manp.c (disable_cache): Likewise.
* src/manpath.c (cat, global): Likewise.
* src/whatis.c (am_apropos, regex_opt, exact, wildcard, require_all,
long_output): Likewise.
Diffstat (limited to 'libdb')
-rw-r--r-- | libdb/db_lookup.c | 8 | ||||
-rw-r--r-- | libdb/db_storage.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c index 4631729e..ff5e2310 100644 --- a/libdb/db_lookup.c +++ b/libdb/db_lookup.c @@ -372,14 +372,14 @@ static gl_list_t dblookup (MYDBM_FILE dbf, const char *page, } gl_list_t dblookup_all (MYDBM_FILE dbf, const char *page, - const char *section, int match_case) + const char *section, bool match_case) { return dblookup (dbf, page, section, ALL | (match_case ? MATCH_CASE : 0)); } struct mandata *dblookup_exact (MYDBM_FILE dbf, const char *page, - const char *section, int match_case) + const char *section, bool match_case) { gl_list_t infos = dblookup (dbf, page, section, EXACT | (match_case ? MATCH_CASE : 0)); @@ -395,8 +395,8 @@ struct mandata *dblookup_exact (MYDBM_FILE dbf, const char *page, } gl_list_t dblookup_pattern (MYDBM_FILE dbf, const char *pattern, - const char *section, int match_case, - int pattern_regex, int try_descriptions) + const char *section, bool match_case, + bool pattern_regex, bool try_descriptions) { gl_list_t infos; struct mandata *tail = NULL; diff --git a/libdb/db_storage.h b/libdb/db_storage.h index 77982492..a04196bc 100644 --- a/libdb/db_storage.h +++ b/libdb/db_storage.h @@ -79,12 +79,12 @@ struct name_ext { /* used by the world */ extern gl_list_t dblookup_all (MYDBM_FILE dbf, const char *page, - const char *section, int match_case); + const char *section, bool match_case); extern struct mandata *dblookup_exact (MYDBM_FILE dbf, const char *page, - const char *section, int match_case); + const char *section, bool match_case); extern gl_list_t dblookup_pattern (MYDBM_FILE dbf, const char *page, - const char *section, int match_case, - int pattern_regex, int try_descriptions); + const char *section, bool match_case, + bool pattern_regex, bool try_descriptions); extern int dbstore (MYDBM_FILE dbf, struct mandata *in, const char *base); extern int dbdelete (MYDBM_FILE dbf, const char *name, struct mandata *in); extern void dbprintf (const struct mandata *info); |