[unix-pc.general] removing UA windows from shell

vern@zebra.UUCP (Vernon C. Hoxie) (11/08/89)

Has any one figured out how to remove a UA window when a shell script
leaves one hanging.  I'm trying to write some shell scripts which call
programs which generate windows.  When it ends, there is my full screen
squashed down to a peek hole.

Is there a command or do I have to make a UA form which calls for a full
screen then dump it?

Try 'newwind' from the shell and see what I mean.  I have to 'exit' back
to the Office and call Full Screen UNIX again to get back big window.

vern

-- 
Vernon C. Hoxie		       {ncar,nbires,boulder,isis}!scicom!zebra!vern
3975 W. 29th Ave.					voice: 303-477-1780
Denver, Colo., 80212				  TB+	 uucp: 303-455-2670

mvadh@cbnews.ATT.COM (andrew.d.hay) (11/10/89)

In article <196@zebra.UUCP> vern@zebra.UUCP (Vernon C. Hoxie) writes:
"
"Has any one figured out how to remove a UA window when a shell script
"leaves one hanging.

i believe that if you kill the process that has the window open, the
window is closed.

the boot script does this, as do some of the install scripts.

-- 
Andrew Hay		+------------------------------------------------------+
42 Authority		|	  Zaphod Beeblebrox is now appearing in	       |
AT&T-BL Ward Hill MA	|    "No S*x Please, We're Amoeboid Cingatularians"    |
a.d.hay@att.com		+------------------------------------------------------+

cs255113@csusac.csus.edu (Dave Jenks) (11/13/89)

I had a similar problem getting my system to a "usable" state, so
I wrote a little utility to clean up the window environment.  It
works by creating a full-screen window with no border, then "leaving
you out in the lurch" like ua does, only the offending window is the
whole screen.  Be sure to check your console settings with stty -a.
It is appropriately named "windex".  Compile the following listing with:

	cc windex.c -o windex -ltam -ltermcap

Hope it works as well for you.  Here it is:


#include <stdio.h>
#include <tam.h>


/* clear any window crap left on the screen */

main(argc, argv)
int	argc;
char	*argv[];
{
    short		wn;
    unsigned short	flags;

    winit();
    flags = NBORDER & ~BORDHSCROLL & ~BORDVSCROLL;
    flags &= (~BORDHELP & ~BORDCANCEL & ~BORDRESIZE);
    if ((wn = wcreate(1, 0, 24, 80, flags)) == -1)
    {
	fprintf(stderr, "%s: error creating window\n", argv[0]);
	wexit(1);
    }
    clear();			/* clear window (lines 2-25) */
    wprompt(wn, "");		/* clear prompt line (26) */
    wcmd(wn, "");		/* clear cmd line (27) */
    wslk(wn, 0, "", "", "");	/* clear screen keys (lines 28 & 29) */
    wrefresh(wn);
    wgoto(wn, 0, 0);
    wexit(0);
}