From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8985 invoked by alias); 19 Feb 2015 22:32:30 -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 8479 invoked by uid 89); 19 Feb 2015 22:32:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-02.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-02.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 Feb 2015 22:32:27 +0000 X-Halon-ID: 2c0d5cc8-b887-11e4-891e-005056917f90 Authorized-sender: jiri@gaisler.se Received: from localhost.localdomain (unknown [78.68.173.120]) by bin-vsp-out-02.atm.binero.net (Halon Mail Gateway) with ESMTPSA; Thu, 19 Feb 2015 23:32:22 +0100 (CET) From: Jiri Gaisler To: gdb-patches@sourceware.org Cc: Jiri Gaisler Subject: [PATCH v2 16/22] sim/erc32: Use readline.h for readline types and functions. Date: Thu, 19 Feb 2015 22:32:00 -0000 Message-Id: <1424385100-15397-17-git-send-email-jiri@gaisler.se> In-Reply-To: <1424385100-15397-1-git-send-email-jiri@gaisler.se> References: <1424385100-15397-1-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00566.txt.bz2 Use gdb's readline.h for readline types. * Makefile.in : Add include path to readline.h sis.c : Remove locally define readline types. --- sim/erc32/Makefile.in | 2 +- sim/erc32/sis.c | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sim/erc32/Makefile.in b/sim/erc32/Makefile.in index e0860a0..4f86017 100644 --- a/sim/erc32/Makefile.in +++ b/sim/erc32/Makefile.in @@ -30,7 +30,7 @@ SIM_EXTRA_CLEAN = clean-sis # UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to # CFLAGS if faster (infinite) UART speed is desired. Might affect the # behaviour of UART interrupt routines ... -SIM_EXTRA_CFLAGS = -DFAST_UART +SIM_EXTRA_CFLAGS = -DFAST_UART -I$(srcroot) ## COMMON_POST_CONFIG_FRAG diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c index 7ff8f32..abcf950 100644 --- a/sim/erc32/sis.c +++ b/sim/erc32/sis.c @@ -36,17 +36,8 @@ /* Structures and functions from readline library */ -typedef struct { - char *line; - char *data; -} HIST_ENTRY; - -extern char * readline (char *prompt); -extern void using_history (void); -extern void add_history (char *string); -extern HIST_ENTRY *remove_history (int which); - - +#include "readline/readline.h" +#include "readline/history.h" /* Command history buffer length - MUST be binary */ #define HIST_LEN 64 -- 2.1.0