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/display.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/display.c')
-rw-r--r-- | readline/display.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/readline/display.c b/readline/display.c index c889318..c627629 100644 --- a/readline/display.c +++ b/readline/display.c @@ -41,10 +41,10 @@ extern int readline_echoing_p; extern char *term_clreol, *term_im, *term_ic, *term_ei, *term_DC; /* Termcap variables. */ extern char *term_up, *term_dc, *term_cr, *term_IC; -extern int screenheight, screenwidth, terminal_can_insert; +extern int screenheight, screenwidth, terminal_can_insert, term_xn; extern void _rl_output_some_chars (); -extern void _rl_output_character_function (); +extern int _rl_output_character_function (); extern int _rl_convert_meta_chars_to_ascii; extern int _rl_horizontal_scroll_mode; @@ -75,11 +75,7 @@ extern char *xmalloc (), *xrealloc (); update_line and the code that calls it makes a multiple line, automatically wrapping line update. Carefull attention needs - to be paid to the vertical position variables. - - handling of terminals with autowrap on (incl. DEC braindamage) - could be improved a bit. Right now I just cheat and decrement - screenwidth by one. */ + to be paid to the vertical position variables. */ /* Keep two buffers; one which reflects the current contents of the screen, and the other to draw what we think the new contents should @@ -240,7 +236,7 @@ rl_redisplay () /* PWP: now is when things get a bit hairy. The visible and invisible line buffers are really multiple lines, which would wrap every - (screenwidth - 1) characters. Go through each in turn, finding + screenwidth characters. Go through each in turn, finding the changed region and updating it. The line order is top to bottom. */ /* If we can move the cursor up and down, then use multiple lines, @@ -363,6 +359,15 @@ update_line (old, new, current_line) register char *ofd, *ols, *oe, *nfd, *nls, *ne; int lendiff, wsatend; + if (_rl_last_c_pos == screenwidth && term_xn && new[0]) + { + putc (new[0], rl_outstream); + _rl_last_c_pos = 1; + _rl_last_v_pos++; + if (old[0]) + old[0] = new[0]; + } + /* Find first difference. */ for (ofd = old, nfd = new; (ofd - old < screenwidth) && *ofd && (*ofd == *nfd); |