2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
21 sccsid
[] = "@(#)delwin.c 1.6 88/02/08 SMI"; /* from UCB 5.1 85/06/07 */
28 * This routine deletes a window and releases it back to the system.
37 if (win
->_orig
== NULL
) {
39 * If we are the original window, delete the space for
40 * all the subwindows, and the array of space as well.
42 for (i
= 0; i
< win
->_maxy
&& win
->_y
[i
]; i
++)
54 * If we are a subwindow, take ourselves out of the
55 * list. NOTE: if we are a subwindow, the minimum list
56 * is orig followed by this subwindow, so there are
57 * always at least two windows in the list.
59 for (wp
= win
->_nextp
; wp
->_nextp
!= win
; wp
= wp
->_nextp
)
61 wp
->_nextp
= win
->_nextp
;