From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75472 invoked by alias); 18 Feb 2016 22:00:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 75412 invoked by uid 89); 18 Feb 2016 22:00:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1821 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 18 Feb 2016 21:59:59 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A64B27AE80 for ; Thu, 18 Feb 2016 21:59:57 +0000 (UTC) Received: from localhost (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1ILxuQh010296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 18 Feb 2016 16:59:57 -0500 From: Sergio Durigan Junior To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 06/10] gdb_readline -> gdb_readline_no_editing References: <1455817236-13642-1-git-send-email-palves@redhat.com> <1455817236-13642-7-git-send-email-palves@redhat.com> X-URL: http://blog.sergiodj.net Date: Thu, 18 Feb 2016 22:00:00 -0000 In-Reply-To: <1455817236-13642-7-git-send-email-palves@redhat.com> (Pedro Alves's message of "Thu, 18 Feb 2016 17:40:32 +0000") Message-ID: <87d1rt3cir.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00578.txt.bz2 On Thursday, February 18 2016, Pedro Alves wrote: > Name this such that it's clearer that this is not a wrapper for the > real readline, but instead a replacement that provides no command line > editing features. > > gdb/ChangeLog: > 2016-02-18 Pedro Alves > > * defs.h (gdb_readline): Delete declaration. > * top.c (gdb_readline): Rename to ... > (gdb_readline_no_editing): ... this, and make static. > --- > gdb/defs.h | 2 -- > gdb/top.c | 7 ++++--- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/gdb/defs.h b/gdb/defs.h > index f6ffeac..b94df30 100644 > --- a/gdb/defs.h > +++ b/gdb/defs.h > @@ -285,8 +285,6 @@ extern void print_transfer_performance (struct ui_file *stream, > > typedef void initialize_file_ftype (void); > > -extern char *gdb_readline (const char *); > - > extern char *gdb_readline_wrapper (const char *); > > extern char *command_line_input (const char *, int, char *); > diff --git a/gdb/top.c b/gdb/top.c > index fb1657a..e781cdd 100644 > --- a/gdb/top.c > +++ b/gdb/top.c > @@ -608,8 +608,9 @@ prevent_dont_repeat (void) > malloc'd and should be freed by the caller. > > A NULL return means end of file. */ > -char * > -gdb_readline (const char *prompt_arg) > + > +static char * > +gdb_readline_no_editing (const char *prompt_arg) > { > int c; > char *result; > @@ -1117,7 +1118,7 @@ command_line_input (const char *prompt_arg, int repeat, char *annotation_suffix) > } > else > { > - rl = gdb_readline (prompt); > + rl = gdb_readline_no_editing (prompt); > } > > if (annotation_level > 1 && instream == stdin) > -- > 1.9.3 Thanks, I like this a lot. LGTM. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/