Subject: pico termcap problems?

From: [email-masked] (Bill Kearney)
Date: 11 Jul 1995 15:48:31 GMT

This is a strange one.  I've got this Northern Telecom DisplayPhone 
terminal I've been using as a console on a Sun 3/60.  It works fine 
except for pico and rarely pine.

The terminal seems to be getting sent some bogus ESC commands and it's 
flipping into a memory dump mode.  This causes the terminal to start 
spewing quite a bit of info to the Sun.  Of course, pico starts seeing 
this and responds with MORE garbage.  Eventually, the Sun gets sick of 
this crap and hangs the terminal.  Since this is the console, pandemonium 
ensues.  Needless to say, I don't run pico on the console.

I want to make this work.  I think it has something to do with the 
termcap entry for the terminal.  

I think pine behaves itself becauses it accepts the xon-xoff stuff via 
the config settings.  pico doesn't seem to follow this.  Perhaps that's 
the problem?

It's very likely this is some sort of terminal over-run issue. 

Any and all suggestions are welcome, e-mail reponses preferred.

Thanks!

Bill

--
| Bill Kearney | [email-masked]               | copyright 1995 
| Butler, MD   | http://access.digex.net/~wkearney/      | W.G.Kearney
| 410-239-0060 | ftp://ftp.digex.net/pub/access/wkearney |

This random quote brought to you by the fortune program:
Yes, but every time I try to see things your way, I get a headache.
All I ask of life is a constant and exaggerated sense of my own
importance.

---

From: Dave Rasmussen <[email-masked]>
Date: Tue, 11 Jul 1995 11:45:57 -0500 (CDT)

>From [email-masked]  Tue Jul 11 11:33:54 1995
>

We had a problem with some wyze-30 terminals that use magic cookies to
emulate stuff like reverse video I think. Anyways, pico tried to do this
on a per character basis instead of per field, and extra spaces wound up
in the strings, causing line wraps and what not.

here are the diffs:
*** display.c.orig	Wed Jun 21 14:10:06 1995
--- display.c	Wed Jun 21 14:10:35 1995
***************
*** 2142,2154 ****
  	    buf++;
  	    (*term.t_rev)(1);
  	    pputc(*buf, 1);
- 	    (*term.t_rev)(0);
  	}
  	else{
  	    pputc(*buf, 0);
  	}
      }    
      while(*++buf != '\0');
      peeol();
      (*term.t_flush)();
  }
--- 2142,2155 ----
  	    buf++;
  	    (*term.t_rev)(1);
  	    pputc(*buf, 1);
  	}
  	else{
+             (*term.t_rev)(0);
  	    pputc(*buf, 0);
  	}
      }    
      while(*++buf != '\0');
+     (*term.t_rev)(0);
      peeol();
      (*term.t_flush)();
  }
***************
*** 2166,2171 ****
--- 2167,2173 ----
  {
      char *obufp, *p, fkey[4], linebuf[NLINE];
      int   row, slot, tspace, nspace[6], index, n;
+     extern int SG;
  
      /*
       * Calculate amount of space for the names column by column...
***************
*** 2214,2219 ****
--- 2216,2222 ----
  		    *obufp++ = *p++;
  		}
  
+ 		n -= SG;
  		while(n-- > 0)
  		  *obufp++ = ' ';
  
***************
*** 2222,2227 ****
--- 2225,2231 ----
  		while(p && *p && n-- > 0)
  		  *obufp++ = *p++;
  
+ 		n -= SG;
  		while(n-- > 0)
  		  *obufp++ = ' ';
  	    }
*** tcap.c.orig	Wed Jun 21 14:09:52 1995
--- tcap.c	Wed Jun 21 14:10:35 1995
***************
*** 79,84 ****
--- 79,85 ----
  #define TCAPSLEN 315
  char tcapbuf[TCAPSLEN];
  char *UP, PC, *CM, *CE, *CL, *SO, *SE;
+ int SG;
  /* 
   * PICO extentions 
   */
***************
*** 166,171 ****
--- 167,174 ----
      CE = tgetstr("ce", &p);
      UP = tgetstr("up", &p);
      SE = tgetstr("se", &p);
+     SG = tgetnum("sg");
+     if (SG < 0) SG = 0;
      SO = tgetstr("so", &p);
      DL = tgetstr("dl", &p);
      AL = tgetstr("al", &p);
*** tinfo.c.orig	Wed Jun 21 14:09:59 1995
--- tinfo.c	Wed Jun 21 14:10:35 1995
***************
*** 82,87 ****
--- 82,88 ----
  static int      putpad();
  
  static char *UP, PC, *CM, *CE, *CL, *SO, *SE;
+ static int SG;
  /* 
   * PICO extentions 
   */
***************
*** 162,167 ****
--- 163,170 ----
      CE = tigetstr("el");
      UP = tigetstr("cuu1");
      SE = tigetstr("rmso");
+     SG = tigetnum("xmc");
+     if (SG < 0) SG = 0;
      SO = tigetstr("smso");
      DL = tigetstr("dl1");
      AL = tigetstr("il1");

-- 
Dave Rasmussen - Information & Media Technologies (ex-CSD) Client Services
Internet: [email-masked]  Phone: 414-229-5133  2m HAM Radio: N9REJ 
USmail: Box 413 Bol213, Milwaukee, WI 53201