🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #87

NN doesn't initialize visual mode

#87
From: Mikel Lechner
Date: Fri, 14 Jul 1989 09:31
113 lines
3178 bytes
I've installed NN on a sun4 and a Multiflow Trace (BSD4.3 Unix),
and have I like the system.  However, it seems that NN does not
use the terminal capabilies "te" and "ti" of the termcap file.
These specify escape sequences to send to the terminal before
using the termcap interface to perform full screen I/O.  The result
is that a SunView cmdtool window gets a garble window if you
try to run NN.

I installed a fix for this problem by setting up these capabilities,
and adding the functions "visual_on" and "visual_off".  The "visual_on"
is invoked initially when starting up NN. and the "visual_off" is called
whenever NN is exited.  Also, when NN is suspended, the "visual_off"
function is invoked, and then a "visual_on" is invoked when NN is
restarted.  This is similar to the "raw_on" function.

This affects other terminal besides SunView cmdtools, so here are
my patches to fix this problem.  This should be applied after patch level 4.
I hope that Kim Storm can include these patches in an upcoming official
NN patch.



*** onn.c       Fri Jul 14 02:20:05 1989
--- nn.c        Fri Jul 14 00:10:27 1989
***************
*** 294,299 ****
--- 294,300 ----
  #endif /* NNTP */
      close_master();
      close_rc();
+     term_term();
      
      exit(n);
  }

*** oexecute.c  Fri Jul 14 02:25:04 1989
--- execute.c   Fri Jul 14 00:14:15 1989
***************
*** 125,135 ****
--- 125,137 ----
      gotoxy(0, Lines-1);
      clrline();
  
+     visual_off();
  #ifdef HAVE_JOBCONTROL
      kill(process_id, SIGTSTP);
  #else
      execute(user_shell, exec_suspend_args);
  #endif
+     visual_on();
  
      s_redraw++;
      if (was_raw) raw();


*** oterm.c	Fri Jul 14 02:26:51 1989
--- term.c	Fri Jul 14 00:43:21 1989
***************
*** 48,53 ****
--- 48,54 ----
  char *BC, *UP;
  short ospeed;
  
+ static char begin_term[64], end_term[64];
  static char XBC[64], XUP[64];
  static char cursor_home[64];
  static char cursor_address[64];
***************
*** 295,300 ****
--- 296,304 ----
      opt_cap("kr", key_right);
      opt_cap("kl", key_left);
  
+     opt_cap("ti", begin_term);
+     opt_cap("te", end_term);
+ 
      cookie_size = tgetnum("sg");
      
      WRAP = tgetflag("am");
***************
*** 349,354 ****
--- 353,376 ----
  
      erase_key = EraseC;
      kill_key  = KillC;
+ 
+     visual_on();
+ }
+ 
+ term_term()
+ {
+     visual_off();
+ }
+ 
+ visual_on()
+ {
+     if (HAS_CAP(begin_term)) putp(begin_term);
+ }
+ 
+ visual_off()
+ {
+     if (HAS_CAP(end_term)) putp(end_term);
+     fl;
  }
  
  home()


----------------------------------------------------------------------
Mikel Lechner			UUCP:  ...!{decwrl,sun}!teraida!mikel
Teradyne EDA, Inc.
5155 Old Ironsides Drive
Santa Clara, Ca 95054
Technical Details
Message-ID: <7243@teraida.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!teraida!mikel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!teraida!mikel
From: mikel@teraida.UUCP (Mikel Lechner)
Newsgroups: comp.sources.bugs
Subject: NN doesn't initialize visual mode
Message-ID: <7243@teraida.UUCP>
Date: 14 Jul 89 09:31:37 GMT
Organization: Teradyne EDA Inc., Santa Clara, Calif.
Lines: 113