diff options
| author | christos <christos@NetBSD.org> | 1997-10-23 22:51:59 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1997-10-23 22:51:59 +0000 |
| commit | bc7956dee12e2d3c69816a916612ed7fbc1df0fb (patch) | |
| tree | f5e2823d483e748ae582259440759d92e826f696 /lib/libedit | |
| parent | 21a80b2b63fbc7659d010faeb345772f31839503 (diff) | |
Const de-poisoning :-( Unfortunately the default gnu readline does not
have full prototypes... With those changes, and a single line change in
gdb/top.c, gdb links with -ledit
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/readline.c | 22 | ||||
| -rw-r--r-- | lib/libedit/readline.h | 13 |
2 files changed, 18 insertions, 17 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index 6221524e100..5273646b526 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.1 1997/10/23 22:24:12 christos Exp $ */ +/* $NetBSD: readline.c,v 1.2 1997/10/23 22:51:59 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.1 1997/10/23 22:24:12 christos Exp $"); +__RCSID("$NetBSD: readline.c,v 1.2 1997/10/23 22:51:59 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/types.h> @@ -95,7 +95,7 @@ static EditLine *e = NULL; /* internal functions */ static unsigned char _el_rl_complete __P((EditLine *, int)); static char *_get_prompt __P((EditLine *)); -static const HIST_ENTRY *_move_history __P((int)); +static HIST_ENTRY *_move_history __P((int)); static int _history_search_gen __P((const char *, int, int)); static int _history_expand_command __P((const char *, int, char **)); static char *_rl_compat_sub __P((const char *, const char *, @@ -116,7 +116,7 @@ _get_prompt(el) /* * generic function for moving around history */ -static const HIST_ENTRY * +static HIST_ENTRY * _move_history(op) int op; { @@ -386,7 +386,7 @@ _history_expand_command(command, len, result) } if (!event_data && event_num >= 0) { - const HIST_ENTRY *rl_he; + HIST_ENTRY *rl_he; rl_he = history_get(event_num); if (!rl_he) return 0; @@ -800,7 +800,7 @@ write_history(filename) * * returned pointer points to static variable */ -const HIST_ENTRY * +HIST_ENTRY * history_get(num) int num; { @@ -885,7 +885,7 @@ where_history() /* * returns current history event or NULL if there is no such event */ -const HIST_ENTRY * +HIST_ENTRY * current_history() { return _move_history(H_CURR); @@ -947,7 +947,7 @@ history_set_pos(pos) /* * returns previous event in history and shifts pointer accordingly */ -const HIST_ENTRY * +HIST_ENTRY * previous_history() { return _move_history(H_PREV); @@ -956,7 +956,7 @@ previous_history() /* * returns next event in history and shifts pointer accordingly */ -const HIST_ENTRY * +HIST_ENTRY * next_history() { return _move_history(H_NEXT); @@ -1060,9 +1060,9 @@ history_search_pos(str, direction, pos) * * it's callers's responsibility to free() returned string */ -char * +char * tilde_expand(txt) - const char *txt; + char *txt; { struct passwd *pass; char *temp; diff --git a/lib/libedit/readline.h b/lib/libedit/readline.h index ce5f340aef0..655121623dd 100644 --- a/lib/libedit/readline.h +++ b/lib/libedit/readline.h @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.1 1997/10/23 22:24:15 christos Exp $ */ +/* $NetBSD: readline.h,v 1.2 1997/10/23 22:52:02 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -59,6 +59,7 @@ extern const char *rl_library_version; extern char *rl_readline_name; extern FILE *rl_instream; extern FILE *rl_outstream; +extern char *rl_line_buffer; extern int rl_point, rl_end; extern int history_base, history_length; extern int max_input_history; @@ -79,12 +80,12 @@ void stifle_history __P((int)); int unstifle_history __P((void)); int history_is_stifled __P((void)); int where_history __P((void)); -const HIST_ENTRY *current_history __P((void)); -const HIST_ENTRY *history_get __P((int)); +HIST_ENTRY *current_history __P((void)); +HIST_ENTRY *history_get __P((int)); int history_total_bytes __P((void)); int history_set_pos __P((int)); -const HIST_ENTRY *previous_history __P((void)); -const HIST_ENTRY *next_history __P((void)); +HIST_ENTRY *previous_history __P((void)); +HIST_ENTRY *next_history __P((void)); int history_search __P((const char *, int)); int history_search_prefix __P((const char *, int)); int history_search_pos __P((const char *, int, int)); @@ -93,7 +94,7 @@ int write_history __P((const char *)); int history_expand __P((char *, char **)); char **history_tokenize __P((const char *)); -char *tilde_expand __P((const char *)); +char *tilde_expand __P((char *)); char *filename_completion_function __P((const char *, int)); char *username_completion_function __P((const char *, int)); int rl_complete __P((int, int)); |
