mikel@teraida.UUCP (Mikel Lechner) (07/14/89)
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
olson@anchor.esd.sgi.com (Dave Olson) (07/16/89)
mikel@teraida.UUCP (Mikel Lechner) writes: >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. The patch is a good idea, but it won't work on systems with terminfo. Change begin_term to enter_ca_mode and end_term to exit_ca_mode, and then it will work in both environments. -- Dave Olson It's important to keep an open mind, but not so open that your brains fall out. -- Stephen A. Kallis, Jr.