From c4ca596a9091e190ef799ee69c315f11f786eee9 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 16 Jun 2005 20:58:19 +0000 Subject: [PATCH] various #ifdef fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/global.c | 2 +- src/proto.h | 6 ++++-- src/search.c | 8 ++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb778fae..e001f9ab 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 ce6dd575..85e33e83 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 7da7f068..80a61450 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 0259dbcb..25cc0605 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 */ -- 2.39.5