This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Two patches for the readline lib



Robert,
I have applied your patches to readline. You should see them
in future snapshots.

Your patches have also been applied to the official version of the
readline library, maintained by Chet Ramey at Case Western 
Reserve University.

Thank you very much for your submissions.

Elena Zannoni
Cygnus Solutions
ezannoni@cygnus.com


Robert Hoehne writes:
 > The following patches for readline disable some terminal specific
 > code which is not available for DJGPP.
 > 
 > Additinally I patched the Makefile.in by removing the current
 > directory from VPATH, since it is already there by default and
 > it confuse GNU make to find the sources on DJGPP where
 > ';' is the path spearator and not ':'.
 > 
 > This patch is against "a March 10th snapshot from DJ"
 > which I got from DJ Delorie.
 > 
 > Sun Mar 14 1999 Robert Hoehne <robert.hoehne@gmx.net>
 > 
 > 	* display.c: changing some terminal calls to work on DJGPP
 > 	* terminal.c: likewise
 > 	* Makefile.in: Remove . from the VPATH directive
 > 
 > --- gdb-snap-march-10th-from-DJ/readline/Makefile.in.orig	Thu Dec 31 04:18:56 1998
 > +++ gdb-snap-march-10th-from-DJ/readline/Makefile.in	Thu Mar 11 23:44:34 1999
 > @@ -19,7 +19,7 @@
 >  RL_LIBRARY_NAME = readline
 >  
 >  srcdir = @srcdir@
 > -VPATH = .:@srcdir@
 > +VPATH = @srcdir@
 >  top_srcdir = @top_srcdir@
 >  BUILD_DIR = @BUILD_DIR@
 >  
 > --- gdb-snap-march-10th-from-DJ/readline/display.c.orig	Tue Dec 22 21:53:32 1998
 > +++ gdb-snap-march-10th-from-DJ/readline/display.c	Sat Mar 13 17:12:42 1999
 > @@ -632,8 +632,12 @@
 >  	  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 @@
 >        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 @@
 >  {
 >    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 @@
 >       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 @@
 >  	  space_to_eol (screenwidth);
 >  	  tputs (term_cr, 1, _rl_output_character_function);
 >  	}
 > +#endif
 >        if (_rl_last_v_pos > 0)
 >  	_rl_move_vert (0);
 >      }
 > --- gdb-snap-march-10th-from-DJ/readline/terminal.c.orig	Mon Dec 21 20:06:30 1998
 > +++ gdb-snap-march-10th-from-DJ/readline/terminal.c	Sat Mar 13 17:20:52 1999
 > @@ -186,8 +186,10 @@
 >        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 @@
 >        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 @@
 >  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 @@
 >  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
 >  }
 > 
 > ******************************************************
 > * email:   Robert Hoehne <robert.hoehne@gmx.net>     *
 > * Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
 > * WWW:     http://www.tu-chemnitz.de/~sho/rho        *
 > ******************************************************