🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #614

Patch for TI/TE problem (actually, more like a kludge)

#614
From: William Kucharski
Date: Mon, 16 Sep 1991 20:30
105 lines
4012 bytes
Enclosed is a patch for the TI/TE problem I wrote about not too long ago.
Basically, there are still problems due to the nature of terminfo and the
fact that when you do a TI after a previous TE you basically get a fresh
screen.  Add to this the problem of "flashing" screens on terminals supporting
an alternate screen (e.g. the operation takes place so quickly that the
screen appears to "flash") and you see why I call it a kludge.  Anyway...

*** respond.c.orig	Mon Sep 16 12:52:38 1991
--- respond.c	Mon Sep 16 14:30:55 1991
***************
*** 199,208 ****
--- 199,210 ----
  		  extract_it:
  		    cnt = 0;
  		    interp(cmd_buf,(sizeof cmd_buf),getval("EXSAVER",EXSAVER));
+ 		    termlib_reset();
  		    resetty();		/* restore tty state */
  		    doshell(SH,cmd_buf);
  		    noecho();		/* revert to cbreaking */
  		    crmode();
+ 		    termlib_init();
  		    break;
  		}
  		else
***************
*** 250,255 ****
--- 252,258 ----
  	savedest = savestr(altbuf);
  	interp(cmd_buf, (sizeof cmd_buf), getval("PIPESAVER",PIPESAVER));
  				/* then set up for command */
+ 	termlib_reset();
  	resetty();		/* restore tty state */
  	if (use_pref)		/* use preferred shell? */
  	    doshell(Nullch,cmd_buf);
***************
*** 258,263 ****
--- 261,267 ----
  	    doshell(sh,cmd_buf);	/* do command with sh */
  	noecho();		/* and stop echoing */
  	crmode();		/* and start cbreaking */
+ 	termlib_init();
      }
      else {			/* normal save */
  	bool there, mailbox;
***************
*** 387,400 ****
  	    getval("MBOXSAVER",MBOXSAVER) :
  	    getval("NORMSAVER",NORMSAVER) ), sizeof cmd_buf);
  				/* format the command */
  	resetty();		/* make terminal behave */
! 	if (doshell(use_pref?Nullch:SH,cmd_buf))
  	    fputs("Not saved",stdout);
! 	else
  	    printf("%s to %s %s",
  	      there?"Appended":"Saved",
  	      mailbox?"mailbox":"file",
  	      s);
  	if (interactive)
  	    putchar('\n') FLUSH;
  	noecho();		/* make terminal do what we want */
--- 391,408 ----
  	    getval("MBOXSAVER",MBOXSAVER) :
  	    getval("NORMSAVER",NORMSAVER) ), sizeof cmd_buf);
  				/* format the command */
+ 	termlib_reset();
  	resetty();		/* make terminal behave */
! 	if (doshell(use_pref?Nullch:SH,cmd_buf)) {
! 	    termlib_init();
  	    fputs("Not saved",stdout);
! 	} else {
! 	    termlib_init();
  	    printf("%s to %s %s",
  	      there?"Appended":"Saved",
  	      mailbox?"mailbox":"file",
  	      s);
+ 	}
  	if (interactive)
  	    putchar('\n') FLUSH;
  	noecho();		/* make terminal do what we want */
***************
*** 637,642 ****
--- 645,651 ----
  	printf(nocd,dir) FLUSH;
  	return;
      }
+     termlib_reset();
  #ifdef VERBOSE
      IF(verbose)
  	printf("\n(leaving cbreak mode; cwd=%s)\nInvoking command: %s\n\n",
***************
*** 658,663 ****
--- 667,673 ----
  #ifdef TERSE
  	fputs("\n(+cbreak)\n",stdout) FLUSH;
  #endif
+     termlib_init();
  #ifdef SERVER
      if (chdir(spool)) {
  #else /* not SERVER */
-- 
| William Kucharski, Solbourne Computer, Inc.     | Opinions expressed above
| Internet: kucharsk@solbourne.com   Ham: N0OKQ   | are MINE alone, not those
| uucp:	...!{boulder,sun,uunet}!stan!kucharsk     | of Solbourne...
| Snail Mail: 1900 Pike Road, Longmont, CO  80501 | "It's Night 9 With D2 Dave!"
Technical Details
Message-ID: <1991Sep16.203027.2491@solbourne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!math.fu-berlin.de!ox.com!caen!sol.ctr.columbia.edu!samsung!uunet!stan!kucharsk

Show Full Headers
Complete Article Headers
Message-ID: <1991Sep16.203027.2491@solbourne.com>
Subject: Patch for TI/TE problem (actually, more like a kludge)
Date: Mon, 16 Sep 1991 20:30:27 +0000
From: kucharsk@solbourne.com (William Kucharski)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!math.fu-berlin.de!ox.com!caen!sol.ctr.columbia.edu!samsung!uunet!stan!kucharsk
Newsgroups: news.software.readers
Organization: Solbourne Computer, Inc., Longmont, CO
Lines: 105