From patchwork Tue Feb 17 07:44:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Gaisler X-Patchwork-Id: 5114 Received: (qmail 1564 invoked by alias); 17 Feb 2015 07:45:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1514 invoked by uid 89); 17 Feb 2015 07:45:47 -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-01.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-01.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 17 Feb 2015 07:45:46 +0000 X-Halon-ID: 0300da99-b679-11e4-acbf-005056917a89 Authorized-sender: jiri@gaisler.se Received: from vaio.orange-hotspot.com (unknown [81.253.22.86]) by bin-vsp-out-01.atm.binero.net (Halon Mail Gateway) with ESMTPSA; Tue, 17 Feb 2015 08:45:58 +0100 (CET) From: Jiri Gaisler To: gdb-patches@sourceware.org Cc: Jiri Gaisler Subject: [PATCH 16/23] sim/erc32: use readline.h for readline types and functions. Date: Tue, 17 Feb 2015 08:44:53 +0100 Message-Id: <1424159099-5148-17-git-send-email-jiri@gaisler.se> In-Reply-To: <1424159099-5148-1-git-send-email-jiri@gaisler.se> References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> 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 f1d79cd..7dfc7da 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$(srcdir)/../.. ## COMMON_POST_CONFIG_FRAG diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c index 2b0871a..a5a81d8 100644 --- a/sim/erc32/sis.c +++ b/sim/erc32/sis.c @@ -35,17 +35,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