summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>1999-04-26 18:30:25 +0000
committerStan Shebs <shebs@apple.com>1999-04-26 18:30:25 +0000
commit3f113cfb38935c85b37a8c77127159cd0db7cf29 (patch)
tree3670078df077398b559691cddc2119f92c889deb
parent7dfd92c2feb89eebcbee8d29bb209d831ca99719 (diff)
downloadgdb-3f113cfb38935c85b37a8c77127159cd0db7cf29.tar.gz
import gdb-19990422 snapshot
-rw-r--r--readline/Makefile.in40
-rw-r--r--readline/display.c21
-rwxr-xr-xreadline/support/config.sub2
-rw-r--r--readline/terminal.c10
4 files changed, 57 insertions, 16 deletions
diff --git a/readline/Makefile.in b/readline/Makefile.in
index 0c5c169fe28..ae402fd047d 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -19,7 +19,7 @@ RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
srcdir = @srcdir@
-VPATH = .:@srcdir@
+VPATH = @srcdir@
top_srcdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
@@ -197,20 +197,30 @@ examples: force
force:
-install: installdirs $(STATIC_LIBS)
- for f in ${INSTALLED_HEADERS}; do \
- $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
- done
- -( if test -f $(libdir)/libreadline.a ; then $(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old; fi )
- $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
- -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
- -( if test -f $(libdir)/libhistory.a; then $(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old; fi )
- $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
- -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
- -( if test -d doc ; then \
- cd doc && \
- ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
- fi )
+## CYGNUS LOCAL
+## Don't mess with people's installed readline's.
+## This tries to install this version of readline over whatever
+## version is already installed on the system (which could be a
+## newer version). There is no real reason for us to install
+## readline along with GDB. GDB links statically against readline,
+## so it doesn't depend on us installing it on the system.
+
+install:
+
+#install: installdirs $(STATIC_LIBS)
+# for f in ${INSTALLED_HEADERS}; do \
+# $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
+# done
+# -( if test -f $(libdir)/libreadline.a ; then $(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old; fi )
+# $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
+# -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
+# -( if test -f $(libdir)/libhistory.a; then $(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old; fi )
+# $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
+# -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
+# -( if test -d doc ; then \
+# cd doc && \
+# ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \
+# fi )
installdirs: $(srcdir)/support/mkdirs
-$(SHELL) $(srcdir)/support/mkdirs $(includedir) \
diff --git a/readline/display.c b/readline/display.c
index f7ec69b247c..00caab69dbd 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -632,8 +632,12 @@ rl_redisplay ()
if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 &&
_rl_last_c_pos <= last_invisible && local_prompt)
{
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
if (term_cr)
tputs (term_cr, 1, _rl_output_character_function);
+#endif
_rl_output_some_chars (local_prompt, nleft);
_rl_last_c_pos = nleft;
}
@@ -880,7 +884,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
term_cr && lendiff > visible_length && _rl_last_c_pos > 0 &&
od > lendiff && _rl_last_c_pos < last_invisible)
{
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
tputs (term_cr, 1, _rl_output_character_function);
+#endif /* !__MSDOS__ */
_rl_output_some_chars (local_prompt, lendiff);
_rl_last_c_pos = lendiff;
}
@@ -1484,7 +1492,11 @@ cr ()
{
if (term_cr)
{
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
tputs (term_cr, 1, _rl_output_character_function);
+#endif /* !__MSDOS__ */
_rl_last_c_pos = 0;
}
}
@@ -1499,8 +1511,16 @@ _rl_redisplay_after_sigwinch ()
the right thing happens if we have wrapped to a new screen line. */
if (term_cr)
{
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
tputs (term_cr, 1, _rl_output_character_function);
+#endif /* !__MSDOS__ */
_rl_last_c_pos = 0;
+#if defined (__MSDOS__)
+ space_to_eol (screenwidth);
+ putc ('\r', rl_outstream);
+#else
if (term_clreol)
tputs (term_clreol, 1, _rl_output_character_function);
else
@@ -1508,6 +1528,7 @@ _rl_redisplay_after_sigwinch ()
space_to_eol (screenwidth);
tputs (term_cr, 1, _rl_output_character_function);
}
+#endif
if (_rl_last_v_pos > 0)
_rl_move_vert (0);
}
diff --git a/readline/support/config.sub b/readline/support/config.sub
index 7541a125fa6..244fbde1feb 100755
--- a/readline/support/config.sub
+++ b/readline/support/config.sub
@@ -703,7 +703,7 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -linux-gnu* | -uxpv* | -qnx* | -powerux)
# Remember, each alternative MUST END IN *, to match a version number.
;;
diff --git a/readline/terminal.c b/readline/terminal.c
index c28669659b0..f5326387218 100644
--- a/readline/terminal.c
+++ b/readline/terminal.c
@@ -186,8 +186,10 @@ _rl_get_screen_size (tty, ignore_env)
if (ignore_env == 0 && (ss = get_env_value ("COLUMNS")))
screenwidth = atoi (ss);
+#if !defined(__DJGPP__)
if (screenwidth <= 0 && term_string_buffer)
screenwidth = tgetnum ("co");
+#endif
}
/* Environment variable LINES overrides setting of "li" if IGNORE_ENV
@@ -197,8 +199,10 @@ _rl_get_screen_size (tty, ignore_env)
if (ignore_env == 0 && (ss = get_env_value ("LINES")))
screenheight = atoi (ss);
+#if !defined(__DJGPP__)
if (screenheight <= 0 && term_string_buffer)
screenheight = tgetnum ("li");
+#endif
}
/* If all else fails, default to 80x24 terminal. */
@@ -277,10 +281,12 @@ static void
get_term_capabilities (bp)
char **bp;
{
+#if !defined(__DJGPP__)
register int i;
for (i = 0; i < NUM_TC_STRINGS; i++)
*(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp);
+#endif
tcap_initialized = 1;
}
@@ -530,16 +536,20 @@ ding ()
void
_rl_enable_meta_key ()
{
+#if !defined(__DJGPP__)
if (term_has_meta && term_mm)
tputs (term_mm, 1, _rl_output_character_function);
+#endif
}
void
_rl_control_keypad (on)
int on;
{
+#if !defined(__DJGPP__)
if (on && term_ks)
tputs (term_ks, 1, _rl_output_character_function);
else if (!on && term_ke)
tputs (term_ke, 1, _rl_output_character_function);
+#endif
}