diff --git a/ChangeLog b/ChangeLog
index 9ee0537a4e4f84d165a16632632544c10f33b5dc..8e330305afc77446bf5d427e73455d49cefb414c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,9 @@ CVS code -
 	  is_punct_mbchar() and is_word_mbchar(); changes to
 	  do_next_word(), do_prev_word(), is_whole_word(),
 	  do_statusbar_next_word(), and do_statusbar_prev_word(). (DLR)
+	- Fix #ifdefs so that nano compiles with NANO_SMALL defined and
+	  DISABLE_TABCOMP undefined.  Changes to revstrstr() and
+	  free_charptrarray() (renamed free_chararray()). (DLR)
 - chars.c:
   make_mbstring()
 	- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a
diff --git a/src/chars.c b/src/chars.c
index 209e9754d3c4cd5905948df29c4047e822c89847..e35a06f467b4775b6a4793bf0414f154b4f63128 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -597,8 +597,7 @@ const char *mbstrcasestr(const char *haystack, const char *needle)
 	return strcasestr(haystack, needle);
 }
 
-#ifndef NANO_SMALL
-#ifndef DISABLE_TABCOMP
+#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
 /* This function is equivalent to strstr(), except in that it scans the
  * string in reverse, starting at rev_start. */
 const char *revstrstr(const char *haystack, const char *needle, const
@@ -618,8 +617,9 @@ const char *revstrstr(const char *haystack, const char *needle, const
 
     return NULL;
 }
-#endif /* !DISABLE_TABCOMP */
+#endif /* !NANO_SMALL || !DISABLE_TABCOMP */
 
+#ifndef NANO_SMALL
 /* This function is equivalent to strcasestr(), except in that it scans
  * the string in reverse, starting at rev_start. */
 const char *revstrcasestr(const char *haystack, const char *needle,
diff --git a/src/files.c b/src/files.c
index b805504aa8c4ed2ad0bd775daa780d1b6c1e4edf..183bbe2641e14f339ecca63fd06e99c6be7e0777 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2010,6 +2010,15 @@ int diralphasort(const void *va, const void *vb)
 
     return strcasecmp(a, b);
 }
+
+/* Free the memory allocated for array, which should contain len
+ * elements. */
+void free_chararray(char **array, size_t len)
+{
+    for (; len > 0; len--)
+	free(array[len - 1]);
+    free(array);
+}
 #endif
 
 #ifndef DISABLE_TABCOMP
@@ -2337,7 +2346,7 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
 	free(mzero);
     }
 
-    free_charptrarray(matches, num_matches);
+    free_chararray(matches, num_matches);
 
     /* Only refresh the edit window if we don't have a list of filename
      * matches on it. */
@@ -2366,15 +2375,6 @@ const char *tail(const char *foo)
 }
 
 #ifndef DISABLE_BROWSER
-/* Free our malloc()ed memory. */
-void free_charptrarray(char **array, size_t len)
-{
-    for (; len > 0; len--)
-	free(array[len - 1]);
-
-    free(array);
-}
-
 /* Strip one directory from the end of path. */
 void striponedir(char *path)
 {
@@ -2651,7 +2651,7 @@ char *do_browser(char *path, DIR *dir)
 		path = mallocstrcpy(path, filelist[selected]);
 
 		/* Start over again with the new path value. */
-		free_charptrarray(filelist, numents);
+		free_chararray(filelist, numents);
 		goto change_browser_directory;
 
 	    /* Refresh the screen. */
@@ -2711,7 +2711,7 @@ char *do_browser(char *path, DIR *dir)
 		/* Start over again with the new path value. */
 		free(path);
 		path = new_path;
-		free_charptrarray(filelist, numents);
+		free_chararray(filelist, numents);
 		goto change_browser_directory;
 
 	    /* Abort the browser. */
@@ -2821,7 +2821,7 @@ char *do_browser(char *path, DIR *dir)
 	SET(CONSTUPDATE);
 
     /* Clean up. */
-    free_charptrarray(filelist, numents);
+    free_chararray(filelist, numents);
     free(path);
 
     return retval;
diff --git a/src/proto.h b/src/proto.h
index 59620e0fc748a90037847c7da1a5dc66620089de..5dde503d8ad664e5fbf8343f0077505ccf38aab8 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -199,11 +199,11 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n);
 const char *nstrcasestr(const char *haystack, const char *needle);
 #endif
 const char *mbstrcasestr(const char *haystack, const char *needle);
-#ifndef NANO_SMALL
-#ifndef DISABLE_TABCOMP
+#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
 const char *revstrstr(const char *haystack, const char *needle, const
 	char *rev_start);
 #endif
+#ifndef NANO_SMALL
 const char *revstrcasestr(const char *haystack, const char *needle,
 	const char *rev_start);
 const char *mbrevstrcasestr(const char *haystack, const char *needle,
@@ -305,6 +305,7 @@ void do_writeout_void(void);
 char *real_dir_from_tilde(const char *buf);
 #if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
 int diralphasort(const void *va, const void *vb);
+void free_chararray(char **array, size_t len);
 #endif
 #ifndef DISABLE_TABCOMP
 char **username_tab_completion(const char *buf, size_t *num_matches,
@@ -315,7 +316,6 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list);
 #endif
 const char *tail(const char *foo);
 #ifndef DISABLE_BROWSER
-void free_charptrarray(char **array, size_t len);
 void striponedir(char *path);
 char **browser_init(const char *path, int *longest, size_t *numents, DIR
 	*dir);