/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
/* A panels subsystem built on curses--Miscellaneous routines */
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
/*LINTLIBRARY*/
#include <stdlib.h>
#include <curses.h>
#include "private.h"
int _Panel_cnt;
static int _Free_list_cnt;
/* panel_window - Return the window pointer */
WINDOW *
{
}
/* panel_userptr - Return the user pointer */
char *
{
}
/* set_panel_userptr - set the user pointer */
int
{
if (panel) {
return (OK);
} else
return (ERR);
}
/*
* panel_above - Return the panel above the
* given panel (or the bottom panel in 0)
*/
PANEL *
{
if (!panel)
return (_Bottom_panel);
}
/*
* panel_below - Return the panel below the
* given panel (or the top panel in 0)
*/
PANEL *
{
if (!panel)
return (_Top_panel);
}
/* panel_hidden - Return TRUE if the panel is hidden, FALSE if not. */
int
{
}
/* _get_overlap - Get an overlap node from the free list. */
static _obscured_list *
_get_overlap(void)
{
if (_Free_list_cnt-- > 0) {
} else {
_Free_list_cnt = 0;
overlap = 0;
}
return (overlap);
}
/*
* _unlink_obs - Find the obscured node, if any,
* in the first panel which refers the second panel.
*/
{
return ((_obscured_list *) 0);
do {
}
#ifdef DEBUG
#endif
return ((_obscured_list *) 0);
}
else {
}
return (obs);
}
/*
* add_obs - Add an obscured node to a panel, ensuring
* that the obscured list is ordered from top to bottom.
*/
static void
{
return;
}
break;
}
}
}
}
/*
* _intersect_panel
* Create an obscured node for each panel that the given panel intersects.
* The overlap record is always attached to the panel which is covered up.
*
* This routine assumes that _alloc_overlap() has been called to ensure
* that there are enough overlap nodes to satisfy the requests.
*/
void
{
int above_panel;
above_panel = FALSE;
above_panel = TRUE;
continue;
}
continue; /* no overlap */
obs = _get_overlap();
if (above_panel) {
} else
} else {
}
}
}
/*
* _alloc_overlap
* Create enough obscured nodes to record all overlaps of a given
* panel. The obscured nodes must be pre-allocated by this routine
* to preserve the integrity of the pile during move.
* If the move operation fails, the pile is supposed to remain
* unchanged. If the obscured nodes are not allocated in advance,
* then an allocation failure in the middle of a move could
* leave the pile in a corrupted state with possibly no way to
* restore the pile to its original state.
*
* The cnt parameter is the(worst case) number of overlap nodes which
* are required to satisfy any request. Return 0 on error, else non-zero
*/
int
{
int i;
for (i = cnt-_Free_list_cnt; i > 0; i--) {
if (!(overlap = (_obscured_list *)
malloc(sizeof (_obscured_list))))
return (0);
}
return (1);
}
/*
* _free_overlap - Free a single overlap node. Don't
* really free it; just save it on a list.
*/
void
{
}