diff options
author | Eli Zaretskii <eliz@gnu.org> | 2000-07-10 15:22:16 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2000-07-10 15:22:16 +0000 |
commit | 30083a32424a2b135c185ca303a335d861bcddbb (patch) | |
tree | 21b3df628080538612703a44835e3f37b72ab94e /readline/display.c | |
parent | 4b6341e9d2361edc6a824e7ce72e1b97ec51b452 (diff) | |
download | gdb-30083a32424a2b135c185ca303a335d861bcddbb.zip gdb-30083a32424a2b135c185ca303a335d861bcddbb.tar.gz gdb-30083a32424a2b135c185ca303a335d861bcddbb.tar.bz2 |
A few tweaks required to use Readline as part of the DJGPP port of GDB.
Diffstat (limited to 'readline/display.c')
-rw-r--r-- | readline/display.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/readline/display.c b/readline/display.c index 4487004..9fff8cc 100644 --- a/readline/display.c +++ b/readline/display.c @@ -41,6 +41,10 @@ #include <stdio.h> +#ifdef __MSDOS__ +# include <pc.h> +#endif + /* System-specific feature definitions and include files. */ #include "rldefs.h" @@ -1224,9 +1228,18 @@ _rl_move_vert (to) } else { /* delta < 0 */ +#ifdef __MSDOS__ + int row, col; + + i = fflush (rl_outstream); /* make sure the cursor pos is current! */ + ScreenGetCursor (&row, &col); + ScreenSetCursor ((row + to - _rl_last_v_pos), col); + delta = i; +#else /* !__MSDOS__ */ if (term_up && *term_up) for (i = 0; i < -delta; i++) tputs (term_up, 1, _rl_output_character_function); +#endif /* !__MSDOS__ */ } _rl_last_v_pos = to; /* Now TO is here */ @@ -1436,9 +1449,12 @@ void _rl_clear_to_eol (count) int count; { +#ifndef __MSDOS__ if (term_clreol) tputs (term_clreol, 1, _rl_output_character_function); - else if (count) + else +#endif + if (count) space_to_eol (count); } @@ -1459,10 +1475,15 @@ space_to_eol (count) void _rl_clear_screen () { +#if defined (__GO32__) + ScreenClear (); /* FIXME: only works in text modes */ + ScreenSetCursor (0, 0); /* term_clrpag is "cl" which homes the cursor */ +#else if (term_clrpag) tputs (term_clrpag, 1, _rl_output_character_function); else crlf (); +#endif } /* Insert COUNT characters from STRING to the output stream. */ @@ -1471,6 +1492,9 @@ insert_some_chars (string, count) char *string; int count; { +#ifdef __MSDOS__ + _rl_output_some_chars (string, count); +#else /* !__MSDOS__ */ /* If IC is defined, then we do not have to "enter" insert mode. */ if (term_IC) { @@ -1503,6 +1527,7 @@ insert_some_chars (string, count) if (term_ei && *term_ei) tputs (term_ei, 1, _rl_output_character_function); } +#endif /* !__MSDOS__ */ } /* Delete COUNT characters from the display line. */ @@ -1513,6 +1538,7 @@ delete_chars (count) if (count > screenwidth) /* XXX */ return; +#ifndef __MSDOS__ if (term_DC && *term_DC) { char *buffer; @@ -1525,6 +1551,7 @@ delete_chars (count) while (count--) tputs (term_dc, 1, _rl_output_character_function); } +#endif /* !__MSDOS__ */ } void |