[16/23] sim/erc32: use readline.h for readline types and functions.

Message ID 1424159099-5148-17-git-send-email-jiri@gaisler.se
State Superseded
Headers

Commit Message

Jiri Gaisler Feb. 17, 2015, 7:44 a.m. UTC
  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(-)
  

Comments

Mike Frysinger Feb. 17, 2015, 9:21 a.m. UTC | #1
On 17 Feb 2015 08:44, Jiri Gaisler wrote:
> --- a/sim/erc32/Makefile.in
> +++ b/sim/erc32/Makefile.in
>
> -SIM_EXTRA_CFLAGS = -DFAST_UART
> +SIM_EXTRA_CFLAGS = -DFAST_UART -I$(srcdir)/../..

pretty sure you mean -I$(srcroot)
-mike
  

Patch

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