From 840da61ad95439a10bce40329bf82e033ec4711b Mon Sep 17 00:00:00 2001 From: Muhammad Bilal Date: Wed, 6 Nov 2013 11:42:52 +0500 Subject: [PATCH] 2013-11-06 Muhammad Bilal PR cli/16122 * top.c (command_line_input): Unify interactivity tests to use input_from_terminal_p. * event-top.c (command_line_handler): Likewise. --- gdb/ChangeLog | 7 +++++++ gdb/event-top.c | 3 +-- gdb/top.c | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c2521385117..e721f029d99 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2013-11-06 Muhammad Bilal + + PR cli/16122 + * top.c (command_line_input): Unify interactivity tests to use + input_from_terminal_p. + * event-top.c (command_line_handler): Likewise. + 2013-11-06 Yao Qi * Makefile.in (check-perf): New target. diff --git a/gdb/event-top.c b/gdb/event-top.c index 1f2e6fb9e7c..1290dd09826 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -606,8 +606,7 @@ command_line_handler (char *rl) *p = 0; /* Add line to history if appropriate. */ - if (instream == stdin - && ISATTY (stdin) && *linebuffer) + if (*linebuffer && input_from_terminal_p ()) add_history (linebuffer); /* Note: lines consisting solely of comments are added to the command diff --git a/gdb/top.c b/gdb/top.c index c473d8c1bd2..7d928e13be2 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1061,8 +1061,7 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix) *p = 0; /* Add line to history if appropriate. */ - if (instream == stdin - && ISATTY (stdin) && *linebuffer) + if (*linebuffer && input_from_terminal_p ()) add_history (linebuffer); /* Note: lines consisting solely of comments are added to the command -- 2.30.2