diff options
author | Per Bothner <per@bothner.com> | 1994-02-15 22:31:19 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1994-02-15 22:31:19 +0000 |
commit | f550cec5b1461950b9f3bea04cb89263143171c5 (patch) | |
tree | 62fc7aee62d2c4edb136845f1ad79d07973fcef4 /readline/readline.c | |
parent | 848743c1b688d0764c4293e635318b9d052040b5 (diff) | |
download | gdb-f550cec5b1461950b9f3bea04cb89263143171c5.zip gdb-f550cec5b1461950b9f3bea04cb89263143171c5.tar.gz gdb-f550cec5b1461950b9f3bea04cb89263143171c5.tar.bz2 |
* readline.c (_rl_output_character_function), display.c:
Return int, not void, to conform with the expected arg of tputs.
* readline.c (init_terminal_io): tgetflag only takes 1 arg.
* readline.c (_rl_savestring): New function.
* chardefs.h: To avoid conflicts and/or warnings, define
savestring as a macro wrapper for _rl_savestring.
* display.c (extern term_xn): It's an int flag, not a string.
* charsdefs.h, rldefs.h: Remove HAVE_STRING_H-related junk.
Diffstat (limited to 'readline/readline.c')
-rw-r--r-- | readline/readline.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/readline/readline.c b/readline/readline.c index 00af9d6..c8b19e3 100644 --- a/readline/readline.c +++ b/readline/readline.c @@ -88,7 +88,7 @@ extern int rl_complete_with_tilde_expansion; /* Forward declarations used in this file. */ void rl_dispatch (); void free_history_entry (); -void _rl_output_character_function (); +int _rl_output_character_function (); void _rl_set_screen_size (); #if !defined (_GO32_) @@ -224,6 +224,8 @@ static int defining_kbd_macro = 0; emacs_meta_keymap or vi_escape_keymap. */ int _rl_convert_meta_chars_to_ascii = 1; +/* Non-zero tells rl_delete_text and rl_insert_text to not add to + the undo list. */ static int doing_an_undo; /* **************************************************************** */ @@ -1235,7 +1237,7 @@ init_terminal_io (terminal_name) screenwidth = screenheight = 0; - term_xn = tgetflag ("am", &buffer) && tgetflag ("xn", &buffer); + term_xn = tgetflag ("am") && tgetflag ("xn"); _rl_set_screen_size (tty, 0); @@ -1319,11 +1321,11 @@ init_terminal_io (terminal_name) } /* A function for the use of tputs () */ -void +int _rl_output_character_function (c) int c; { - putc (c, out_stream); + return putc (c, out_stream); } /* Write COUNT characters from STRING to the output stream. */ @@ -2277,10 +2279,6 @@ rl_transpose_chars (count) /* */ /* **************************************************************** */ -/* Non-zero tells rl_delete_text and rl_insert_text to not add to - the undo list. */ -static int doing_an_undo = 0; - /* The current undo list for THE_LINE. */ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; @@ -3063,6 +3061,15 @@ rl_getc (stream) } } +char * +_rl_savestring (str) + char *str; +{ + char *copy = (char*) xmalloc (strlen (str) + 1); + strcpy (copy, str); + return copy; +} + #if defined (STATIC_MALLOC) /* **************************************************************** */ |