Imported from ../bash-2.05.tar.gz.
[platform/upstream/bash.git] / lib / readline / histsearch.c
index a72a68b..ff4f3a1 100644 (file)
@@ -7,7 +7,7 @@
 
    The Library is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 1, or (at your option)
+   the Free Software Foundation; either version 2, or (at your option)
    any later version.
 
    The Library is distributed in the hope that it will be useful, but
@@ -18,7 +18,7 @@
    The GNU General Public License is often shipped with GNU software, and
    is generally kept in a file called COPYING or LICENSE.  If you do not
    have a copy of the license, write to the Free Software Foundation,
-   675 Mass Ave, Cambridge, MA 02139, USA. */
+   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
 
 #define READLINE_LIBRARY
 
@@ -33,6 +33,9 @@
 #  include "ansi_stdlib.h"
 #endif /* HAVE_STDLIB_H */
 #if defined (HAVE_UNISTD_H)
+#  ifdef _MINIX
+#    include <sys/types.h>
+#  endif
 #  include <unistd.h>
 #endif
 #if defined (HAVE_STRING_H)
@@ -44,9 +47,6 @@
 #include "history.h"
 #include "histlib.h"
 
-/* Variables imported from other history library files. */
-extern int history_offset;
-
 /* The list of alternate characters that can delimit a history search
    string. */
 char *history_search_delimiter_chars = (char *)NULL;
@@ -63,7 +63,7 @@ char *history_search_delimiter_chars = (char *)NULL;
 
 static int
 history_search_internal (string, direction, anchored)
-     char *string;
+     const char *string;
      int direction, anchored;
 {
   register int i, reverse;
@@ -159,7 +159,7 @@ history_search_internal (string, direction, anchored)
 /* Do a non-anchored search for STRING through the history in DIRECTION. */
 int
 history_search (string, direction)
-     char *string;
+     const char *string;
      int direction;
 {
   return (history_search_internal (string, direction, NON_ANCHORED_SEARCH));
@@ -168,7 +168,7 @@ history_search (string, direction)
 /* Do an anchored search for string through the history in DIRECTION. */
 int
 history_search_prefix (string, direction)
-     char *string;
+     const char *string;
      int direction;
 {
   return (history_search_internal (string, direction, ANCHORED_SEARCH));
@@ -179,7 +179,7 @@ history_search_prefix (string, direction)
    which point to begin searching. */
 int
 history_search_pos (string, dir, pos)
-     char *string;
+     const char *string;
      int dir, pos;
 {
   int ret, old;