aboutsummaryrefslogtreecommitdiff
path: root/readline/histsearch.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-08 22:31:39 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-08 22:31:39 +0000
commit9255ee3150832d7e235fc0711f0efa70700559e7 (patch)
tree97d578647cc7f257e42ce12fa74e570b783ee0b9 /readline/histsearch.c
parentffbceea9fb49e8dd28c88a4b59cf8616b2dcc210 (diff)
downloadgdb-9255ee3150832d7e235fc0711f0efa70700559e7.zip
gdb-9255ee3150832d7e235fc0711f0efa70700559e7.tar.gz
gdb-9255ee3150832d7e235fc0711f0efa70700559e7.tar.bz2
Import of readline 4.3.
Non-readline modified files: src/gdb/ChangeLog src/gdb/defs.h src/gdb/cli/cli-cmds.c src/gdb/cli/cli-setshow.c src/gdb/tui/ChangeLog src/gdb/tui/tuiWin.c In readline directory: * compat.c, mbutil.c, misc.c, rlmbutil.h, rltypedefs.h, text.c, doc/history.0, doc/history.3, support/wcwidth.c, examples/readlinebuf.h, examples/rlcat.c: New files. * CHANGELOG, CHANGES, INSTALL, MANIFEST, Makefile.in, README, aclocal.m4, ansi_stdlib.h, bind.c, callback.c, chardefs.h, complete.c, config.h.in, configure, configure.in, display.c, emacs_keymap.c, funmap.c, histexpand.c, histfile.c, histlib.h, history.c, history.h, histsearch.c, input.c, isearch.c, keymaps.c, keymaps.h, kill.c, macro.c, nls.c, parens.c, posixdir.h, readline.c, readline.h, rlconf.h, rldefs.h, rlprivate.h, rlshell.h, rlstdc.h, rltty.c, savestring.c, search.c, shell.c, signals.c, terminal.c, tilde.c, tilde.h, undo.c, util.c, vi_keymap.c, vi_mode.c, xmalloc.c, xmalloc.h, doc/Makefile.in, doc/hist.texinfo, doc/hstech.texinfo, doc/hsuser.texinfo, doc/manvers.texinfo, doc/readline.3, doc/rlman.texinfo, doc/rltech.texinfo, doc/rluser.texinfo doc/rluserman.texinfo, doc/texi2dvi, doc/texi2html, shlib/Makefile.in, support/install.sh, support/mkdirs, support/mkdist, support/shlib-install, support/shobj-conf, examples/Inputrc, examples/Makefile.in, examples/fileman.c, examples/histexamp.c, examples/manexamp.c, examples/rl.c, examples/rlfe.c, examples/rltest.c, examples/rlversion.c: Modified files.
Diffstat (limited to 'readline/histsearch.c')
-rw-r--r--readline/histsearch.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/readline/histsearch.c b/readline/histsearch.c
index 8d153b6..d94fd6c 100644
--- a/readline/histsearch.c
+++ b/readline/histsearch.c
@@ -32,17 +32,13 @@
#else
# 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)
-# include <string.h>
-#else
-# include <strings.h>
-#endif /* !HAVE_STRING_H */
#include "history.h"
#include "histlib.h"
@@ -51,6 +47,8 @@
string. */
char *history_search_delimiter_chars = (char *)NULL;
+static int history_search_internal PARAMS((const char *, int, int));
+
/* Search the history for STRING, starting at history_offset.
If DIRECTION < 0, then the search is through previous entries, else
through subsequent. If ANCHORED is non-zero, the string must
@@ -63,7 +61,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 +157,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 +166,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 +177,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;