From 284877104fe3ca978da828c301dec87b53a4c60b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 4 Apr 2016 19:38:57 +0200
Subject: [PATCH] search: fix compilation when configured with --enable-tiny

SVN revision 5748 could cause some 'else's to be orphaned.

This fixes https://savannah.gnu.org/bugs/?47610.

Reported-by: Thomas Rosenau <thomasr@fantasymail.de>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 src/proto.h  | 2 +-
 src/search.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/proto.h b/src/proto.h
index d131ef64..2f7fae60 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -595,8 +595,8 @@ void do_findnext(void);
 #endif
 #if !defined(NANO_TINY) || !defined(DISABLE_BROWSER)
 void do_research(void);
-void go_looking(void);
 #endif
+void go_looking(void);
 #ifdef HAVE_REGEX_H
 int replace_regexp(char *string, bool create);
 #endif
diff --git a/src/search.c b/src/search.c
index e1965f79..0ad9b611 100644
--- a/src/search.c
+++ b/src/search.c
@@ -228,14 +228,16 @@ int search_init(bool replacing, bool use_answer)
 	TOGGLE(BACKWARDS_SEARCH);
 	backupstring = mallocstrcpy(backupstring, answer);
 	return 1;
+    } else
 #endif
 #ifdef HAVE_REGEX_H
-    } else if (func == regexp_void) {
+    if (func == regexp_void) {
 	TOGGLE(USE_REGEXP);
 	backupstring = mallocstrcpy(backupstring, answer);
 	return 1;
+    } else
 #endif
-    } else if (func == do_replace || func == flip_replace_void) {
+    if (func == do_replace || func == flip_replace_void) {
 	backupstring = mallocstrcpy(backupstring, answer);
 	return -2;	/* Call the opposite search function. */
     } else if (func == do_gotolinecolumn_void) {
-- 
GitLab