Path: utzoo!utgpu!watmath!uunet!cs.utexas.edu!wuarchive!decwrl!polyslo!cindy!csusac!cs255113 From: cs255113@csusac.csus.edu (Dave Jenks) Newsgroups: unix-pc.general Subject: Re: removing UA windows from shell Summary: Cleaning windows with "windex" Keywords: tam(3) Message-ID: <1989Nov13.053354.21009@csusac.csus.edu> Date: 13 Nov 89 05:33:54 GMT References: <196@zebra.UUCP> Sender: ucbvax!ucdavis!csusac!cs255113 Reply-To: cs255113@csusac.UUCP (Dave Jenks) Distribution: unix-pc Organization: California State University, Sacramento Lines: 42 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 #include /* 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); }