diff --git a/ChangeLog b/ChangeLog index eb778faef6ecefbbee48e1fb7da2abaa12ba1da6..e001f9ab730519dc52e5f30be13246d4cd4400ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -214,6 +214,9 @@ CVS code - - Add macro charset(), a wrapper that calls memset(). (DLR) - Readd #defines for the isblank() and iswblank() equivalents. (DLR) +- proto.h: + - Add missing NANO_SMALL and HAVE_REGEX_H #ifdefs around the + do_find_bracket() prototype. (DLR) - rcfile.c: color_to_int() - Since colorname's being NULL is handled elsewhere now, assert diff --git a/src/global.c b/src/global.c index ce6dd575b87966084f636d77cbb1e4ec184ad859..85e33e834bf90f839f0a405e059a886704fd5dac 100644 --- a/src/global.c +++ b/src/global.c @@ -617,7 +617,7 @@ void shortcut_init(bool unjustify) NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify); #endif -#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H) +#if defined(HAVE_REGEX_H) && !defined(NANO_SMALL) sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"), IFHELP(nano_bracket_msg, NANO_BRACKET_KEY), NANO_NO_KEY, NANO_NO_KEY, VIEW, do_find_bracket); diff --git a/src/proto.h b/src/proto.h index 7da7f068381526dd834552e00978c0ccfbcc942c..80a614509b151514e8a23eb151c4e41d26d8c5ea 100644 --- a/src/proto.h +++ b/src/proto.h @@ -530,8 +530,10 @@ void do_gotolinecolumn_void(void); #if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER) void do_gotopos(int line, size_t pos_x, int pos_y, size_t pos_pww); #endif -void do_find_bracket(void); #ifndef NANO_SMALL +#ifdef HAVE_REGEX_H +void do_find_bracket(void); +#endif #ifdef ENABLE_NANORC bool history_has_changed(void); #endif @@ -544,7 +546,7 @@ char *get_history_newer(filestruct **h); #ifndef DISABLE_TABCOMP char *get_history_completion(filestruct **h, char *s, size_t len); #endif -#endif +#endif /* !NANO_SMALL */ /* Public functions in utils.c. */ #ifdef HAVE_REGEX_H diff --git a/src/search.c b/src/search.c index 0259dbcb8d8c1184a4ccf0391da6259c5e1b03a4..25cc06052d9fc13b8d23b86865af50be6ad674d0 100644 --- a/src/search.c +++ b/src/search.c @@ -1038,7 +1038,8 @@ void do_gotopos(int line, size_t pos_x, int pos_y, size_t pos_pww) } #endif -#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H) +#ifndef NANO_SMALL +#ifdef HAVE_REGEX_H void do_find_bracket(void) { const char *pos, *bracket_pat = "([{<>}])"; @@ -1121,9 +1122,8 @@ void do_find_bracket(void) if (!regexp_set) UNSET(USE_REGEXP); } -#endif +#endif /* HAVE_REGEX_H */ -#ifndef NANO_SMALL #ifdef ENABLE_NANORC /* Indicate whether any of the history lists have changed. */ bool history_has_changed(void) @@ -1308,4 +1308,4 @@ char *get_history_completion(filestruct **h, char *s, size_t len) return s; } #endif -#endif /* !NANO_SMALL && ENABLE_NANORC */ +#endif /* !NANO_SMALL */