File:  [MW Coherent from dump] / coherent / g / usr / bin / vsh / winlib / closwin.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 *	Close one window, free memory and update remaining windows
 *
 *      Copyright (c) 1990-93 by Udo Munk
 */

#ifdef AIX
#define NLS
#endif

#include <curses.h>
#include "winfun.h"

extern W_LIST *wl;
extern void free();

close_window(w)
WINDOW *w;
{
	register W_LIST *wlp = wl->w_next;
	register W_LIST *lwlp = wl;

	if ((lwlp->w_next == (W_LIST *) 0) || (lwlp->w_w == w)) /* don't close */
		return(WIN_ERR);				/* stdscr !! */
	do {
		if (wlp->w_w == w) {
			lwlp->w_next = wlp->w_next;
			delwin(wlp->w_w);
			free((char *) wlp);
			wlp = lwlp->w_next;
			touchwin(lwlp->w_w);
			wnoutrefresh(lwlp->w_w);
		} else {
			touchwin(lwlp->w_w);
			wnoutrefresh(lwlp->w_w);
			lwlp = wlp;
			wlp = wlp->w_next;
		}
	} while (wlp != (W_LIST *) 0);
	touchwin(lwlp->w_w);
	wnoutrefresh(lwlp->w_w);
	doupdate();
	return(WIN_OK);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.