aboutsummaryrefslogtreecommitdiff
path: root/readline/examples/rlfe/rlfe.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-05-11 23:38:44 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-05-11 23:38:44 +0000
commitcc88a640ca1d0356c5feb40bb48869bab5a2bdce (patch)
tree2b845ec3c6b554e4fe702a48844fe13330c0f58c /readline/examples/rlfe/rlfe.c
parent4cab4add34b167b3902b1cb2873738914103f6ff (diff)
downloadfsf-binutils-gdb-cc88a640ca1d0356c5feb40bb48869bab5a2bdce.zip
fsf-binutils-gdb-cc88a640ca1d0356c5feb40bb48869bab5a2bdce.tar.gz
fsf-binutils-gdb-cc88a640ca1d0356c5feb40bb48869bab5a2bdce.tar.bz2
Imported readline 6.2, and upstream patch 001.
[patch 0/3] readline-6.2 rebase http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html [patch 1/3] readline-6.2: Merge of already posted patches http://sourceware.org/ml/gdb-patches/2011-05/msg00004.html = [Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html [Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html [Bug-readline] [patch] Makefile.in htm<->html http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html [Bug-readline] [patch] Remove . from the VPATH directive http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff: http://sourceware.org/ml/gdb/2011-04/msg00002.html Jan Kratochvil's patch for FSF GDB tree local-specific changes: http://sourceware.org/ml/gdb/2011-04/msg00006.html Preservation of existing ChangeLog.gdb files, their updates. [patch 2/3] readline-6.2: Workaround "ask" regression http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html [patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat. http://sourceware.org/ml/gdb-patches/2011-05/msg00006.html [patch 4/3] readline-6.2: Substitute inc-hist.texinfo http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html readline/ Workaround gdb.base/completion.exp regression on readline-6.2. * complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK. Imported readline 6.2, and upstream patch 001. * configure: Regenerate. readline/doc/ * hsuser.texi (Using History Interactively): Disable !BashFeatures @defcodeindex. Make the `Programming with GNU History' reference external. * inc-hist.texinfo: Remove. Imported readline 6.2, and upstream patch 001. readline/examples/ Imported readline 6.2, and upstream patch 001. readline/examples/rlfe/ Imported readline 6.2, and upstream patch 001. gdb/ * config.in: Regenerate. * configure: Regenerate. * configure.ac <--with-system-readline> (for readline_echoing_p): Remove the test. * tui/tui-io.c (tui_old_readline_echoing_p): Rename to ... (tui_old_rl_echoing_p): ... here. (tui_setup_io): Rename extern declaration readline_echoing_p to _rl_echoing_p. Adjust assignments for the both renames. gdb/doc/ * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to hsuser.texi. * gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and comment to hsuser.texi. Change rluser.texi name in the comment.
Diffstat (limited to 'readline/examples/rlfe/rlfe.c')
-rw-r--r--readline/examples/rlfe/rlfe.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/readline/examples/rlfe/rlfe.c b/readline/examples/rlfe/rlfe.c
index 6d747dc..eacd5ab 100644
--- a/readline/examples/rlfe/rlfe.c
+++ b/readline/examples/rlfe/rlfe.c
@@ -73,6 +73,11 @@
#include <termios.h>
#include "config.h"
+#include "extern.h"
+
+#if defined (HAVE_SYS_WAIT_H)
+# include <sys/wait.h>
+#endif
#ifdef READLINE_LIBRARY
# include "readline.h"
@@ -588,7 +593,7 @@ main(int argc, char** argv)
}
if (FD_ISSET (in_from_tty_fd, &in_set))
{
- extern int readline_echoing_p;
+ extern int _rl_echoing_p;
struct termios term_master;
int do_canon = 1;
int do_icrnl = 1;
@@ -605,9 +610,9 @@ main(int argc, char** argv)
{
do_canon = (term_master.c_lflag & ICANON) != 0;
do_icrnl = (term_master.c_lflag & ICRNL) != 0;
- readline_echoing_p = (term_master.c_lflag & ECHO) != 0;
+ _rl_echoing_p = (term_master.c_lflag & ECHO) != 0;
DPRINT1 ("echo,canon,crnl:%03d\n",
- 100 * readline_echoing_p
+ 100 * _rl_echoing_p
+ 10 * do_canon
+ 1 * do_icrnl);
}
@@ -757,7 +762,7 @@ static void set_edit_mode ()
vi = 1;
break;
}
- shellopts = index (shellopts + 1, ':');
+ shellopts = strchr (shellopts + 1, ':');
}
if (!vi)