🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #70

Re: Problems with TERMCAP in 0.99

#70
From: john John Franks
Date: Tue, 13 Jun 1989 19:39
142 lines
4273 bytes
In article <767@accuvax.nwu.edu> john@hopf.math.nwu.edu (John Franks) writes:
>Here is a diff with version 0.99.  It includes some previous changes
>to fix the way term_backspace is set.  I posted this 
>fix earlier.

Unfortunately the previous posting got lost. 
Hope that doesn't confuse things too much.  I am
including my most recent diffs deal with the problem that a termcap
file name is sometimes sent to init_terminal_io() instead of a 
file name (see <767@accuvax.nwu.edu>) as well as the backspace 
problem.  Here are quotes from the original posting:

I believe that there is a bug in redline.c where the termcap backspace
string is read.  It seems this string "term_backspace"  is never actually
set to the correct value.  

Also I had to add a couple of declartions to get it to compile with the
Sun C compiler (SunOS 4.0) on Sun 3's and 4's.  Here are the diffs.


*** readline.c.orig.0.99	Mon Jun 12 15:58:04 1989
--- readline.c	Mon Jun 12 15:58:03 1989
***************
*** 233,234 ****
--- 232,234 ----
  #ifdef SIGWINCH
+ static int
  rl_handle_sigwinch (sig, code, scp)
***************
*** 237,238 ****
--- 237,239 ----
  {
+ 	char *get_string_value( );
    if (readline_echoing_p)
***************
*** 239,241 ****
      {
!       rl_reset_terminal (get_string_value ("TERM"));
        putc ('\r', out_stream);
--- 240,242 ----
      {
!       rl_reset_terminal ();
        putc ('\r', out_stream);
***************
*** 496,498 ****
    /* Initialize the terminal interface. */
!   init_terminal_io ((char *)NULL);
  
--- 497,499 ----
    /* Initialize the terminal interface. */
!   init_terminal_io( );
  
***************
*** 715,716 ****
--- 716,720 ----
  
+ static void move_cursor_relative();
+ static void output_some_chars();
+ 
  /* Non-zero means to always use horizontal scrolling in line display. */
***************
*** 723,725 ****
    register char *line = invisible_line;
-   static void move_cursor_relative ();
    int c_pos = 0, v_pos = 0;
--- 727,728 ----
***************
*** 1214,1219 ****
     has changed. */
! rl_reset_terminal (terminal_name)
!      char *terminal_name;
  {
!   init_terminal_io (terminal_name);
  }
--- 1217,1221 ----
     has changed. */
! rl_reset_terminal ( )
  {
!   init_terminal_io ( );
  }
***************
*** 1220,1225 ****
  
! init_terminal_io (terminal_name)
!      char *terminal_name;
  {
!   char *term = (terminal_name? terminal_name : (char *)getenv ("TERM"));
    char *tgetstr (), *buffer = term_string_buffer;
--- 1222,1226 ----
  
! init_terminal_io( )
  {
!   char *term = (char *)getenv ("TERM");
    char *tgetstr (), *buffer = term_string_buffer;
***************
*** 1235,1243 ****
    }
! 
!   buffer = (char *)xmalloc (2048);
!   BC = tgetstr ("pc", &buffer);
!   PC = buffer ? *buffer : 0;
!   BC = tgetstr ("le", &buffer);
! 
!   term_backspace = tgetstr ("bw", &buffer);
  
--- 1236,1239 ----
    }
!   PC = (tgetstr( "pc", &buffer) ? *buffer : 0);
!   BC = term_backspace = tgetstr( "le", &buffer);
  

###################################################################
  
In builtins.c there are some embedded newlines in strings which the
Sun cc doesn't like:

diff builtins.c builtins.c.orig.0.99
363c363,364
< 	command name.\n\n\
---
> 	command name.
> 
367c368,369
< 	respectively.\n\n\
---
> 	respectively.
> 

##################################################################
In shell.c the two functions termination_unwind_protect() and 
throw_to_top_level()  must be declared sighandler for the Sun cc.

diff shell.c shell.c.orig.0.99
768d767
< sighandler
778d776
< sighandler


John Franks 	Dept of Math. Northwestern University
		Internet	john@math.nwu.edu
		Bitnet		j_franks@nuacc
Technical Details
Message-ID: <770@accuvax.nwu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!hopf!john
References: <767@accuvax.nwu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!hopf!john
From: john@hopf. (John Franks)
Newsgroups: gnu.bash.bug
Subject: Re: Problems with TERMCAP in 0.99
Message-ID: <770@accuvax.nwu.edu>
Date: 13 Jun 89 19:39:25 GMT
References: <767@accuvax.nwu.edu>
Sender: news@accuvax.nwu.edu
Reply-To: john@hopf.math.nwu.edu (John Franks)
Distribution: gnu
Organization: Northwestern Univ. Evanston, Il.
Lines: 142