diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-11-09 09:06:04 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-11-09 09:06:04 +0000 |
commit | a388f199193767bacbb38b172ab89cb84369736c (patch) | |
tree | a1816f5667d2280b970ca44e407bac8cc4496c0a /contrib/ncurses/panel | |
parent | aa59d4d4c5dda7e1c6f9dc0cc6edc58992a525c7 (diff) | |
download | src-a388f199193767bacbb38b172ab89cb84369736c.tar.gz src-a388f199193767bacbb38b172ab89cb84369736c.zip |
- Flatten the vendor area
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=184786
Diffstat (limited to 'contrib/ncurses/panel')
-rw-r--r-- | contrib/ncurses/panel/Makefile.in | 159 | ||||
-rw-r--r-- | contrib/ncurses/panel/headers | 32 | ||||
-rw-r--r-- | contrib/ncurses/panel/llib-lpanel | 182 | ||||
-rw-r--r-- | contrib/ncurses/panel/llib-lpanelw | 182 | ||||
-rw-r--r-- | contrib/ncurses/panel/modules | 51 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_above.c | 52 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_below.c | 54 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_bottom.c | 72 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_delete.c | 57 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_hidden.c | 48 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_hide.c | 58 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_move.c | 56 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_new.c | 108 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_replace.c | 58 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_show.c | 69 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_top.c | 46 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_update.c | 63 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_user.c | 56 | ||||
-rw-r--r-- | contrib/ncurses/panel/p_win.c | 46 | ||||
-rw-r--r-- | contrib/ncurses/panel/panel.c | 157 | ||||
-rw-r--r-- | contrib/ncurses/panel/panel.h | 77 | ||||
-rw-r--r-- | contrib/ncurses/panel/panel.priv.h | 191 |
22 files changed, 0 insertions, 1874 deletions
diff --git a/contrib/ncurses/panel/Makefile.in b/contrib/ncurses/panel/Makefile.in deleted file mode 100644 index 89dbeeac9009..000000000000 --- a/contrib/ncurses/panel/Makefile.in +++ /dev/null @@ -1,159 +0,0 @@ -# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $ -############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # -# # -# Permission is hereby granted, free of charge, to any person obtaining a # -# copy of this software and associated documentation files (the "Software"), # -# to deal in the Software without restriction, including without limitation # -# the rights to use, copy, modify, merge, publish, distribute, distribute # -# with modifications, sublicense, and/or sell copies of the Software, and to # -# permit persons to whom the Software is furnished to do so, subject to the # -# following conditions: # -# # -# The above copyright notice and this permission notice shall be included in # -# all copies or substantial portions of the Software. # -# # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # -# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # -# DEALINGS IN THE SOFTWARE. # -# # -# Except as contained in this notice, the name(s) of the above copyright # -# holders shall not be used in advertising or otherwise to promote the sale, # -# use or other dealings in this Software without prior written # -# authorization. # -############################################################################## -# -# Author: Thomas E. Dickey 1996-on -# -# Makefile for panels source code. -# -# This makes the following: -# libraries (normal/debug/profile/shared) -# -# The variable 'srcdir' refers to the source-distribution, and can be set with -# the configure script by "--srcdir=DIR". -# -# The rules are organized to produce the libraries for the configured models, - -# turn off _all_ suffix rules; we'll generate our own -.SUFFIXES: - -SHELL = /bin/sh -THIS = Makefile - -x = @EXEEXT@ -o = .@OBJEXT@ - -MODEL = @DFT_LWR_MODEL@ -DESTDIR = @DESTDIR@ -srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -includedir = @includedir@ -datadir = @datadir@ - -LIBTOOL = @LIBTOOL@ -LIBTOOL_CLEAN = @LIB_CLEAN@ -LIBTOOL_COMPILE = @LIB_COMPILE@ -LIBTOOL_LINK = @LIB_LINK@ -LIBTOOL_INSTALL = @LIB_INSTALL@ -LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ - -INSTALL = @INSTALL@ -INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ -INSTALL_PROG = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -AR = @AR@ -AR_OPTS = @AR_OPTS@ -AWK = @AWK@ -LD = @LD@ -LN_S = @LN_S@ - -CC = @CC@ -CPP = @CPP@ -CFLAGS = @CFLAGS@ - -CPPFLAGS = -I@top_srcdir@/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ - -CCFLAGS = $(CPPFLAGS) $(CFLAGS) - -CFLAGS_LIBTOOL = $(CCFLAGS) -CFLAGS_NORMAL = $(CCFLAGS) -CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE -CFLAGS_PROFILE = $(CCFLAGS) -pg -CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ - -CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) - -LINK = $(LIBTOOL_LINK) -LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ - -SHLIB_DIRS = -L../lib -SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@ - -MK_SHARED_LIB = @MK_SHARED_LIB@ - -NCURSES_MAJOR = @NCURSES_MAJOR@ -NCURSES_MINOR = @NCURSES_MINOR@ -REL_VERSION = @cf_cv_rel_version@ -ABI_VERSION = @cf_cv_abi_version@ - -RANLIB = @LIB_PREP@ - -LIBRARIES = @LIBS_TO_MAKE@ - -LINT = @LINT@ -LINT_OPTS = @LINT_OPTS@ -LINT_LIBS = -lpanel -lncurses @LIBS@ - -AUTO_SRC = \ - ../include/panel.h - -################################################################################ -all \ -libs \ -install :: $(AUTO_SRC) $(LIBRARIES) - -sources: $(AUTO_SRC) - -$(DESTDIR)$(bindir) \ -$(DESTDIR)$(libdir) : - sh $(srcdir)/../mkdirs.sh $@ - -# make a copy to simplify include-paths while still keeping panel's include -# file in this directory. -../include/panel.h : $(srcdir)/panel.h - -rm -f $@ - cp $(srcdir)/panel.h $@ - -PANEL_PRIV_H = \ - $(srcdir)/panel.priv.h \ - $(srcdir)/panel.h - -tags: - ctags *.[ch] - -@MAKE_UPPER_TAGS@TAGS: -@MAKE_UPPER_TAGS@ etags *.[ch] - -mostlyclean :: - -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace - -clean :: mostlyclean - -rm -f $(AUTO_SRC) - -distclean :: clean - -rm -f Makefile - -realclean :: distclean - -############################################################################### -# The remainder of this file is automatically generated during configuration -############################################################################### diff --git a/contrib/ncurses/panel/headers b/contrib/ncurses/panel/headers deleted file mode 100644 index 8719ea15dc7b..000000000000 --- a/contrib/ncurses/panel/headers +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 1998,2006 Free Software Foundation, Inc. # -# # -# Permission is hereby granted, free of charge, to any person obtaining a # -# copy of this software and associated documentation files (the "Software"), # -# to deal in the Software without restriction, including without limitation # -# the rights to use, copy, modify, merge, publish, distribute, distribute # -# with modifications, sublicense, and/or sell copies of the Software, and to # -# permit persons to whom the Software is furnished to do so, subject to the # -# following conditions: # -# # -# The above copyright notice and this permission notice shall be included in # -# all copies or substantial portions of the Software. # -# # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # -# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # -# DEALINGS IN THE SOFTWARE. # -# # -# Except as contained in this notice, the name(s) of the above copyright # -# holders shall not be used in advertising or otherwise to promote the sale, # -# use or other dealings in this Software without prior written # -# authorization. # -############################################################################## -# -# Author: Thomas E. Dickey <dickey@clark.net> 1996 -# -$(srcdir)/panel.h -# vile:makemode diff --git a/contrib/ncurses/panel/llib-lpanel b/contrib/ncurses/panel/llib-lpanel deleted file mode 100644 index de49c234ecaa..000000000000 --- a/contrib/ncurses/panel/llib-lpanel +++ /dev/null @@ -1,182 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Thomas E. Dickey 1997,2002,2005 * - ****************************************************************************/ -/* LINTLIBRARY */ - -/* ./panel.c */ - -#include "panel.priv.h" - -#undef _nc_retrace_panel -PANEL *_nc_retrace_panel( - PANEL *pan) - { return(*(PANEL **)0); } - -#undef _nc_my_visbuf -const char *_nc_my_visbuf( - const void *ptr) - { return(*(const char **)0); } - -#undef _nc_dPanel -void _nc_dPanel( - const char *text, - const PANEL *pan) - { /* void */ } - -#undef _nc_dStack -void _nc_dStack( - const char *fmt, - int num, - const PANEL *pan) - { /* void */ } - -#undef _nc_Wnoutrefresh -void _nc_Wnoutrefresh( - const PANEL *pan) - { /* void */ } - -#undef _nc_Touchpan -void _nc_Touchpan( - const PANEL *pan) - { /* void */ } - -#undef _nc_Touchline -void _nc_Touchline( - const PANEL *pan, - int start, - int count) - { /* void */ } - -/* ./p_above.c */ - -#undef panel_above -PANEL *panel_above( - const PANEL *pan) - { return(*(PANEL **)0); } - -/* ./p_below.c */ - -#undef panel_below -PANEL *panel_below( - const PANEL *pan) - { return(*(PANEL **)0); } - -/* ./p_bottom.c */ - -#undef bottom_panel -int bottom_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_delete.c */ - -#undef del_panel -int del_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_hide.c */ - -#undef hide_panel -int hide_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_hidden.c */ - -#undef panel_hidden -int panel_hidden( - const PANEL *pan) - { return(*(int *)0); } - -/* ./p_move.c */ - -#undef move_panel -int move_panel( - PANEL *pan, - int starty, - int startx) - { return(*(int *)0); } - -/* ./p_new.c */ - -#undef new_panel -PANEL *new_panel( - WINDOW *win) - { return(*(PANEL **)0); } - -/* ./p_replace.c */ - -#undef replace_panel -int replace_panel( - PANEL *pan, - WINDOW *win) - { return(*(int *)0); } - -/* ./p_show.c */ - -#undef show_panel -int show_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_top.c */ - -#undef top_panel -int top_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_update.c */ - -#undef update_panels -void update_panels(void) - { /* void */ } - -/* ./p_user.c */ - -#undef set_panel_userptr -int set_panel_userptr( - PANEL *pan, - void *uptr) - { return(*(int *)0); } - -#undef panel_userptr -void *panel_userptr( - const PANEL *pan) - { return(*(void **)0); } - -/* ./p_win.c */ - -#undef panel_window -WINDOW *panel_window( - const PANEL *pan) - { return(*(WINDOW **)0); } diff --git a/contrib/ncurses/panel/llib-lpanelw b/contrib/ncurses/panel/llib-lpanelw deleted file mode 100644 index 48bd1e0db5a7..000000000000 --- a/contrib/ncurses/panel/llib-lpanelw +++ /dev/null @@ -1,182 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2002,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Thomas E. Dickey 2002,2005 * - ****************************************************************************/ -/* LINTLIBRARY */ - -/* ./panel.c */ - -#include "panel.priv.h" - -#undef _nc_retrace_panel -PANEL *_nc_retrace_panel( - PANEL *pan) - { return(*(PANEL **)0); } - -#undef _nc_my_visbuf -const char *_nc_my_visbuf( - const void *ptr) - { return(*(const char **)0); } - -#undef _nc_dPanel -void _nc_dPanel( - const char *text, - const PANEL *pan) - { /* void */ } - -#undef _nc_dStack -void _nc_dStack( - const char *fmt, - int num, - const PANEL *pan) - { /* void */ } - -#undef _nc_Wnoutrefresh -void _nc_Wnoutrefresh( - const PANEL *pan) - { /* void */ } - -#undef _nc_Touchpan -void _nc_Touchpan( - const PANEL *pan) - { /* void */ } - -#undef _nc_Touchline -void _nc_Touchline( - const PANEL *pan, - int start, - int count) - { /* void */ } - -/* ./p_above.c */ - -#undef panel_above -PANEL *panel_above( - const PANEL *pan) - { return(*(PANEL **)0); } - -/* ./p_below.c */ - -#undef panel_below -PANEL *panel_below( - const PANEL *pan) - { return(*(PANEL **)0); } - -/* ./p_bottom.c */ - -#undef bottom_panel -int bottom_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_delete.c */ - -#undef del_panel -int del_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_hide.c */ - -#undef hide_panel -int hide_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_hidden.c */ - -#undef panel_hidden -int panel_hidden( - const PANEL *pan) - { return(*(int *)0); } - -/* ./p_move.c */ - -#undef move_panel -int move_panel( - PANEL *pan, - int starty, - int startx) - { return(*(int *)0); } - -/* ./p_new.c */ - -#undef new_panel -PANEL *new_panel( - WINDOW *win) - { return(*(PANEL **)0); } - -/* ./p_replace.c */ - -#undef replace_panel -int replace_panel( - PANEL *pan, - WINDOW *win) - { return(*(int *)0); } - -/* ./p_show.c */ - -#undef show_panel -int show_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_top.c */ - -#undef top_panel -int top_panel( - PANEL *pan) - { return(*(int *)0); } - -/* ./p_update.c */ - -#undef update_panels -void update_panels(void) - { /* void */ } - -/* ./p_user.c */ - -#undef set_panel_userptr -int set_panel_userptr( - PANEL *pan, - void *uptr) - { return(*(int *)0); } - -#undef panel_userptr -void *panel_userptr( - const PANEL *pan) - { return(*(void **)0); } - -/* ./p_win.c */ - -#undef panel_window -WINDOW *panel_window( - const PANEL *pan) - { return(*(WINDOW **)0); } diff --git a/contrib/ncurses/panel/modules b/contrib/ncurses/panel/modules deleted file mode 100644 index d0f7a796678f..000000000000 --- a/contrib/ncurses/panel/modules +++ /dev/null @@ -1,51 +0,0 @@ -# $Id: modules,v 1.9 2006/12/24 00:53:17 tom Exp $ -############################################################################## -# Copyright (c) 1998,2006 Free Software Foundation, Inc. # -# # -# Permission is hereby granted, free of charge, to any person obtaining a # -# copy of this software and associated documentation files (the "Software"), # -# to deal in the Software without restriction, including without limitation # -# the rights to use, copy, modify, merge, publish, distribute, distribute # -# with modifications, sublicense, and/or sell copies of the Software, and to # -# permit persons to whom the Software is furnished to do so, subject to the # -# following conditions: # -# # -# The above copyright notice and this permission notice shall be included in # -# all copies or substantial portions of the Software. # -# # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # -# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # -# DEALINGS IN THE SOFTWARE. # -# # -# Except as contained in this notice, the name(s) of the above copyright # -# holders shall not be used in advertising or otherwise to promote the sale, # -# use or other dealings in this Software without prior written # -# authorization. # -############################################################################## -# -# Author: Thomas E. Dickey 1995-on -# - -@ base -# Library objects -panel lib $(srcdir) $(PANEL_PRIV_H) -p_above lib $(srcdir) $(PANEL_PRIV_H) -p_below lib $(srcdir) $(PANEL_PRIV_H) -p_bottom lib $(srcdir) $(PANEL_PRIV_H) -p_delete lib $(srcdir) $(PANEL_PRIV_H) -p_hide lib $(srcdir) $(PANEL_PRIV_H) -p_hidden lib $(srcdir) $(PANEL_PRIV_H) -p_move lib $(srcdir) $(PANEL_PRIV_H) -p_new lib $(srcdir) $(PANEL_PRIV_H) -p_replace lib $(srcdir) $(PANEL_PRIV_H) -p_show lib $(srcdir) $(PANEL_PRIV_H) -p_top lib $(srcdir) $(PANEL_PRIV_H) -p_update lib $(srcdir) $(PANEL_PRIV_H) -p_user lib $(srcdir) $(PANEL_PRIV_H) -p_win lib $(srcdir) $(PANEL_PRIV_H) - -# vile:makemode diff --git a/contrib/ncurses/panel/p_above.c b/contrib/ncurses/panel/p_above.c deleted file mode 100644 index 32495f627f2d..000000000000 --- a/contrib/ncurses/panel/p_above.c +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_above.c - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $") - -NCURSES_EXPORT(PANEL *) -panel_above(const PANEL * pan) -{ - T((T_CALLED("panel_above(%p)"), pan)); - if (!pan) - { - /* if top and bottom are equal, we have no or only the pseudo panel; - if not, we return the panel above the pseudo panel */ - returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above); - } - else - returnPanel(pan->above); -} diff --git a/contrib/ncurses/panel/p_below.c b/contrib/ncurses/panel/p_below.c deleted file mode 100644 index c4b241015f5b..000000000000 --- a/contrib/ncurses/panel/p_below.c +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_below.c - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $") - -NCURSES_EXPORT(PANEL *) -panel_below(const PANEL * pan) -{ - T((T_CALLED("panel_below(%p)"), pan)); - if (!pan) - { - /* if top and bottom are equal, we have no or only the pseudo panel */ - returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel); - } - else - { - /* we must not return the pseudo panel */ - returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below); - } -} diff --git a/contrib/ncurses/panel/p_bottom.c b/contrib/ncurses/panel/p_bottom.c deleted file mode 100644 index b861fd9b2ce7..000000000000 --- a/contrib/ncurses/panel/p_bottom.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_bottom.c - * Place a panel on bottom of the stack; may already be in the stack - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $") - -NCURSES_EXPORT(int) -bottom_panel(PANEL * pan) -{ - int err = OK; - - T((T_CALLED("bottom_panel(%p)"), pan)); - if (pan) - { - if (!Is_Bottom(pan)) - { - - dBug(("--> bottom_panel %s", USER_PTR(pan->user))); - - HIDE_PANEL(pan, err, OK); - assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - - dStack("<lb%d>", 1, pan); - - pan->below = _nc_bottom_panel; - pan->above = _nc_bottom_panel->above; - if (pan->above) - pan->above->below = pan; - _nc_bottom_panel->above = pan; - - dStack("<lb%d>", 9, pan); - } - } - else - err = ERR; - - returnCode(err); -} diff --git a/contrib/ncurses/panel/p_delete.c b/contrib/ncurses/panel/p_delete.c deleted file mode 100644 index 24ee26b4ff23..000000000000 --- a/contrib/ncurses/panel/p_delete.c +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_delete.c - * Remove a panel from stack, if in it, and free struct - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $") - -NCURSES_EXPORT(int) -del_panel(PANEL * pan) -{ - int err = OK; - - T((T_CALLED("del_panel(%p)"), pan)); - if (pan) - { - dBug(("--> del_panel %s", USER_PTR(pan->user))); - HIDE_PANEL(pan, err, OK); - free((void *)pan); - } - else - err = ERR; - - returnCode(err); -} diff --git a/contrib/ncurses/panel/p_hidden.c b/contrib/ncurses/panel/p_hidden.c deleted file mode 100644 index 624c07dae0ba..000000000000 --- a/contrib/ncurses/panel/p_hidden.c +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_hidden.c - * Test whether or not panel is hidden - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $") - -NCURSES_EXPORT(int) -panel_hidden(const PANEL * pan) -{ - T((T_CALLED("panel_hidden(%p)"), pan)); - if (!pan) - returnCode(ERR); - returnCode(IS_LINKED(pan) ? FALSE : TRUE); -} diff --git a/contrib/ncurses/panel/p_hide.c b/contrib/ncurses/panel/p_hide.c deleted file mode 100644 index 08d8853a201c..000000000000 --- a/contrib/ncurses/panel/p_hide.c +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_hide.c - * Remove a panel from the stack - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $") - -NCURSES_EXPORT(int) -hide_panel(register PANEL * pan) -{ - int err = OK; - - T((T_CALLED("hide_panel(%p)"), pan)); - if (!pan) - returnCode(ERR); - - dBug(("--> hide_panel %s", USER_PTR(pan->user))); - dStack("<u%d>", 1, pan); - - HIDE_PANEL(pan, err, ERR); - - dStack("<u%d>", 9, pan); - - returnCode(err); -} diff --git a/contrib/ncurses/panel/p_move.c b/contrib/ncurses/panel/p_move.c deleted file mode 100644 index 3818e8cba860..000000000000 --- a/contrib/ncurses/panel/p_move.c +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_move.c - * Move a panel to a new location - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $") - -NCURSES_EXPORT(int) -move_panel(PANEL * pan, int starty, int startx) -{ - T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx)); - - if (!pan) - returnCode(ERR); - - if (IS_LINKED(pan)) - { - Touchpan(pan); - PANEL_UPDATE(pan, (PANEL *) 0); - } - - returnCode(mvwin(pan->win, starty, startx)); -} diff --git a/contrib/ncurses/panel/p_new.c b/contrib/ncurses/panel/p_new.c deleted file mode 100644 index 3e48e3696735..000000000000 --- a/contrib/ncurses/panel/p_new.c +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_new.c - * Creation of a new panel - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_new.c,v 1.8 2005/02/19 16:41:03 tom Exp $") - -#ifdef TRACE -static char *stdscr_id; -static char *new_id; -#endif - -/*+------------------------------------------------------------------------- - Get root (i.e. stdscr's) panel. - Establish the pseudo panel for stdscr if necessary. ---------------------------------------------------------------------------*/ -static PANEL * -root_panel(void) -{ - if (_nc_stdscr_pseudo_panel == (PANEL *) 0) - { - - assert(stdscr && !_nc_bottom_panel && !_nc_top_panel); - _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL)); - if (_nc_stdscr_pseudo_panel != 0) - { - PANEL *pan = _nc_stdscr_pseudo_panel; - WINDOW *win = stdscr; - - pan->win = win; - pan->below = (PANEL *) 0; - pan->above = (PANEL *) 0; -#ifdef TRACE - if (!stdscr_id) - stdscr_id = strdup("stdscr"); - pan->user = stdscr_id; -#else - pan->user = (void *)0; -#endif - _nc_bottom_panel = _nc_top_panel = pan; - } - } - return _nc_stdscr_pseudo_panel; -} - -NCURSES_EXPORT(PANEL *) -new_panel(WINDOW *win) -{ - PANEL *pan = (PANEL *) 0; - - T((T_CALLED("new_panel(%p)"), win)); - - if (!win) - returnPanel(pan); - - if (!_nc_stdscr_pseudo_panel) - (void)root_panel(); - assert(_nc_stdscr_pseudo_panel); - - if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL)))) - { - pan->win = win; - pan->above = (PANEL *) 0; - pan->below = (PANEL *) 0; -#ifdef TRACE - if (!new_id) - new_id = strdup("new"); - pan->user = new_id; -#else - pan->user = (char *)0; -#endif - (void)show_panel(pan); - } - returnPanel(pan); -} diff --git a/contrib/ncurses/panel/p_replace.c b/contrib/ncurses/panel/p_replace.c deleted file mode 100644 index 5d0d295c8b17..000000000000 --- a/contrib/ncurses/panel/p_replace.c +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_replace.c - * Replace a panels window. - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $") - -NCURSES_EXPORT(int) -replace_panel(PANEL * pan, WINDOW *win) -{ - T((T_CALLED("replace_panel(%p,%p)"), pan, win)); - - if (!pan) - returnCode(ERR); - - if (IS_LINKED(pan)) - { - Touchpan(pan); - PANEL_UPDATE(pan, (PANEL *) 0); - } - - pan->win = win; - - returnCode(OK); -} diff --git a/contrib/ncurses/panel/p_show.c b/contrib/ncurses/panel/p_show.c deleted file mode 100644 index 35eee237b958..000000000000 --- a/contrib/ncurses/panel/p_show.c +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_show.c - * Place a panel on top of the stack; may already be in the stack - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $") - -NCURSES_EXPORT(int) -show_panel(PANEL * pan) -{ - int err = OK; - - T((T_CALLED("show_panel(%p)"), pan)); - - if (!pan) - returnCode(ERR); - - if (Is_Top(pan)) - returnCode(OK); - - dBug(("--> show_panel %s", USER_PTR(pan->user))); - - HIDE_PANEL(pan, err, OK); - - dStack("<lt%d>", 1, pan); - assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - - _nc_top_panel->above = pan; - pan->below = _nc_top_panel; - pan->above = (PANEL *) 0; - _nc_top_panel = pan; - - dStack("<lt%d>", 9, pan); - - returnCode(OK); -} diff --git a/contrib/ncurses/panel/p_top.c b/contrib/ncurses/panel/p_top.c deleted file mode 100644 index 8bd1d9fb3fec..000000000000 --- a/contrib/ncurses/panel/p_top.c +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_top.c - * Place a panel on top of the stack. - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_top.c,v 1.5 2005/02/19 16:42:23 tom Exp $") - -NCURSES_EXPORT(int) -top_panel(PANEL * pan) -{ - T((T_CALLED("top_panel(%p)"), pan)); - returnCode(show_panel(pan)); -} diff --git a/contrib/ncurses/panel/p_update.c b/contrib/ncurses/panel/p_update.c deleted file mode 100644 index 5967718160ff..000000000000 --- a/contrib/ncurses/panel/p_update.c +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_update.c - * wnoutrefresh windows in an orderly fashion - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $") - -NCURSES_EXPORT(void) -update_panels(void) -{ - PANEL *pan; - - T((T_CALLED("update_panels()"))); - dBug(("--> update_panels")); - pan = _nc_bottom_panel; - while (pan && pan->above) - { - PANEL_UPDATE(pan, pan->above); - pan = pan->above; - } - - pan = _nc_bottom_panel; - while (pan) - { - Wnoutrefresh(pan); - pan = pan->above; - } - - returnVoid; -} diff --git a/contrib/ncurses/panel/p_user.c b/contrib/ncurses/panel/p_user.c deleted file mode 100644 index ffa25f85ae12..000000000000 --- a/contrib/ncurses/panel/p_user.c +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_user.c - * Set/Get panels user pointer - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_user.c,v 1.6 2005/02/19 16:52:44 tom Exp $") - -NCURSES_EXPORT(int) -set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) -{ - T((T_CALLED("set_panel_userptr(%p,%p)"), pan, uptr)); - if (!pan) - returnCode(ERR); - pan->user = uptr; - returnCode(OK); -} - -NCURSES_EXPORT(NCURSES_CONST void *) -panel_userptr(const PANEL * pan) -{ - T((T_CALLED("panel_userptr(%p)"), pan)); - returnCVoidPtr(pan ? pan->user : (NCURSES_CONST void *)0); -} diff --git a/contrib/ncurses/panel/p_win.c b/contrib/ncurses/panel/p_win.c deleted file mode 100644 index e7d2cea8e3fe..000000000000 --- a/contrib/ncurses/panel/p_win.c +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* p_win.c - * Return a panels window. - */ -#include "panel.priv.h" - -MODULE_ID("$Id: p_win.c,v 1.5 2005/02/19 16:44:16 tom Exp $") - -NCURSES_EXPORT(WINDOW *) -panel_window(const PANEL * pan) -{ - T((T_CALLED("panel_window(%p)"), pan)); - returnWin(pan ? pan->win : (WINDOW *)0); -} diff --git a/contrib/ncurses/panel/panel.c b/contrib/ncurses/panel/panel.c deleted file mode 100644 index 16a8083d64b2..000000000000 --- a/contrib/ncurses/panel/panel.c +++ /dev/null @@ -1,157 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* panel.c -- implementation of panels library, some core routines */ -#include "panel.priv.h" - -MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $") - -/*+------------------------------------------------------------------------- - _nc_retrace_panel (pan) ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(PANEL *) -_nc_retrace_panel(PANEL * pan) -{ - T((T_RETURN("%p"), pan)); - return pan; -} -#endif - -/*+------------------------------------------------------------------------- - _nc_my_visbuf(ptr) ---------------------------------------------------------------------------*/ -#ifdef TRACE -#ifndef TRACE_TXT -NCURSES_EXPORT(const char *) -_nc_my_visbuf(const void *ptr) -{ - char temp[32]; - - if (ptr != 0) - sprintf(temp, "ptr:%p", ptr); - else - strcpy(temp, "<null>"); - return _nc_visbuf(temp); -} -#endif -#endif - -/*+------------------------------------------------------------------------- - dPanel(text,pan) ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(void) -_nc_dPanel(const char *text, const PANEL * pan) -{ - _tracef("%s id=%s b=%s a=%s y=%d x=%d", - text, USER_PTR(pan->user), - (pan->below) ? USER_PTR(pan->below->user) : "--", - (pan->above) ? USER_PTR(pan->above->user) : "--", - PSTARTY(pan), PSTARTX(pan)); -} -#endif - -/*+------------------------------------------------------------------------- - dStack(fmt,num,pan) ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(void) -_nc_dStack(const char *fmt, int num, const PANEL * pan) -{ - char s80[80]; - - sprintf(s80, fmt, num, pan); - _tracef("%s b=%s t=%s", s80, - (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--", - (_nc_top_panel) ? USER_PTR(_nc_top_panel->user) : "--"); - if (pan) - _tracef("pan id=%s", USER_PTR(pan->user)); - pan = _nc_bottom_panel; - while (pan) - { - dPanel("stk", pan); - pan = pan->above; - } -} -#endif - -/*+------------------------------------------------------------------------- - Wnoutrefresh(pan) - debugging hook for wnoutrefresh ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(void) -_nc_Wnoutrefresh(const PANEL * pan) -{ - dPanel("wnoutrefresh", pan); - wnoutrefresh(pan->win); -} -#endif - -/*+------------------------------------------------------------------------- - Touchpan(pan) ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(void) -_nc_Touchpan(const PANEL * pan) -{ - dPanel("Touchpan", pan); - touchwin(pan->win); -} -#endif - -/*+------------------------------------------------------------------------- - Touchline(pan,start,count) ---------------------------------------------------------------------------*/ -#ifdef TRACE -NCURSES_EXPORT(void) -_nc_Touchline(const PANEL * pan, int start, int count) -{ - char s80[80]; - - sprintf(s80, "Touchline s=%d c=%d", start, count); - dPanel(s80, pan); - touchline(pan->win, start, count); -} -#endif - -#ifndef TRACE -# ifndef __GNUC__ - /* Some C compilers need something defined in a source file */ -extern void _nc_dummy_panel(void); -void -_nc_dummy_panel(void) -{ -} -# endif -#endif diff --git a/contrib/ncurses/panel/panel.h b/contrib/ncurses/panel/panel.h deleted file mode 100644 index 1e02091d97f2..000000000000 --- a/contrib/ncurses/panel/panel.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * - * and: Eric S. Raymond <esr@snark.thyrsus.com> * - ****************************************************************************/ - -/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */ - -/* panel.h -- interface file for panels library */ - -#ifndef NCURSES_PANEL_H_incl -#define NCURSES_PANEL_H_incl 1 - -#include <curses.h> - -typedef struct panel -{ - WINDOW *win; - struct panel *below; - struct panel *above; - NCURSES_CONST void *user; -} PANEL; - -#if defined(__cplusplus) -extern "C" { -#endif - -extern NCURSES_EXPORT(WINDOW*) panel_window (const PANEL *); -extern NCURSES_EXPORT(void) update_panels (void); -extern NCURSES_EXPORT(int) hide_panel (PANEL *); -extern NCURSES_EXPORT(int) show_panel (PANEL *); -extern NCURSES_EXPORT(int) del_panel (PANEL *); -extern NCURSES_EXPORT(int) top_panel (PANEL *); -extern NCURSES_EXPORT(int) bottom_panel (PANEL *); -extern NCURSES_EXPORT(PANEL*) new_panel (WINDOW *); -extern NCURSES_EXPORT(PANEL*) panel_above (const PANEL *); -extern NCURSES_EXPORT(PANEL*) panel_below (const PANEL *); -extern NCURSES_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); -extern NCURSES_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); -extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int); -extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *); -extern NCURSES_EXPORT(int) panel_hidden (const PANEL *); - -#if defined(__cplusplus) -} -#endif - -#endif /* NCURSES_PANEL_H_incl */ - -/* end of panel.h */ diff --git a/contrib/ncurses/panel/panel.priv.h b/contrib/ncurses/panel/panel.priv.h deleted file mode 100644 index 98d741ff6ef0..000000000000 --- a/contrib/ncurses/panel/panel.priv.h +++ /dev/null @@ -1,191 +0,0 @@ -/**************************************************************************** - * Copyright (c) 1998-2001,2005 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/* $Id: panel.priv.h,v 1.21 2005/11/26 15:27:00 tom Exp $ */ - -#ifndef NCURSES_PANEL_PRIV_H -#define NCURSES_PANEL_PRIV_H 1 - -#if HAVE_CONFIG_H -# include <ncurses_cfg.h> -#endif - -#include <stdlib.h> -#include <string.h> -#include <assert.h> - -#if HAVE_LIBDMALLOC -# include <dmalloc.h> /* Gray Watson's library */ -#endif - -#if HAVE_LIBDBMALLOC -# include <dbmalloc.h> /* Conor Cahill's library */ -#endif - -#include "curses.priv.h" -#include "panel.h" -#include <nc_panel.h> - -#if USE_RCS_IDS -# define MODULE_ID(id) static const char Ident[] = id; -#else -# define MODULE_ID(id) /*nothing*/ -#endif - - -#ifdef TRACE - extern NCURSES_EXPORT(const char *) _nc_my_visbuf (const void *); -# ifdef TRACE_TXT -# define USER_PTR(ptr) _nc_visbuf((const char *)ptr) -# else -# define USER_PTR(ptr) _nc_my_visbuf((const char *)ptr) -# endif - -# define returnPanel(code) TRACE_RETURN(code,panel) - - extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); - extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*); - extern NCURSES_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); - extern NCURSES_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); - extern NCURSES_EXPORT(void) _nc_Touchpan (const PANEL*); - extern NCURSES_EXPORT(void) _nc_Touchline (const PANEL*, int, int); - -# define dBug(x) _tracef x -# define dPanel(text,pan) _nc_dPanel(text,pan) -# define dStack(fmt,num,pan) _nc_dStack(fmt,num,pan) -# define Wnoutrefresh(pan) _nc_Wnoutrefresh(pan) -# define Touchpan(pan) _nc_Touchpan(pan) -# define Touchline(pan,start,count) _nc_Touchline(pan,start,count) -#else /* !TRACE */ -# define returnPanel(code) return code -# define dBug(x) -# define dPanel(text,pan) -# define dStack(fmt,num,pan) -# define Wnoutrefresh(pan) wnoutrefresh((pan)->win) -# define Touchpan(pan) touchwin((pan)->win) -# define Touchline(pan,start,count) touchline((pan)->win,start,count) -#endif - -#define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel -#define _nc_top_panel _nc_panelhook()->top_panel -#define _nc_bottom_panel _nc_panelhook()->bottom_panel - -#define EMPTY_STACK() (_nc_top_panel==_nc_bottom_panel) -#define Is_Bottom(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above==(p))) -#define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p))) -#define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel)) - -/*+------------------------------------------------------------------------- - IS_LINKED(pan) - check to see if panel is in the stack ---------------------------------------------------------------------------*/ -/* This works! The only case where it would fail is, when the list has - only one element. But this could only be the pseudo panel at the bottom */ -#define IS_LINKED(p) (((p)->above || (p)->below ||((p)==_nc_bottom_panel)) ? TRUE : FALSE) - -#define PSTARTX(pan) ((pan)->win->_begx) -#define PENDX(pan) ((pan)->win->_begx + getmaxx((pan)->win) - 1) -#define PSTARTY(pan) ((pan)->win->_begy) -#define PENDY(pan) ((pan)->win->_begy + getmaxy((pan)->win) - 1) - -/*+------------------------------------------------------------------------- - PANELS_OVERLAPPED(pan1,pan2) - check panel overlapped ----------------------------------------------------------------------------*/ -#define PANELS_OVERLAPPED(pan1,pan2) \ -(( !(pan1) || !(pan2) || \ - PSTARTY(pan1) > PENDY(pan2) || PENDY(pan1) < PSTARTY(pan2) ||\ - PSTARTX(pan1) > PENDX(pan2) || PENDX(pan1) < PSTARTX(pan2) ) \ - ? FALSE : TRUE) - - -/*+------------------------------------------------------------------------- - Compute the intersection rectangle of two overlapping rectangles ----------------------------------------------------------------------------*/ -#define COMPUTE_INTERSECTION(pan1,pan2,ix1,ix2,iy1,iy2)\ - ix1 = (PSTARTX(pan1) < PSTARTX(pan2)) ? PSTARTX(pan2) : PSTARTX(pan1);\ - ix2 = (PENDX(pan1) < PENDX(pan2)) ? PENDX(pan1) : PENDX(pan2);\ - iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\ - iy2 = (PENDY(pan1) < PENDY(pan2)) ? PENDY(pan1) : PENDY(pan2);\ - assert((ix1<=ix2) && (iy1<=iy2));\ - - -/*+------------------------------------------------------------------------- - Walk through the panel stack starting at the given location and - check for intersections; overlapping panels are "touched", so they - are incrementally overwriting cells that should be hidden. - If the "touch" flag is set, the panel gets touched before it is - updated. ----------------------------------------------------------------------------*/ -#define PANEL_UPDATE(pan,panstart)\ -{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\ - while(pan2) {\ - if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\ - int y,ix1,ix2,iy1,iy2;\ - COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\ - for(y = iy1; y <= iy2; y++) {\ - if (is_linetouched(pan->win,y - PSTARTY(pan))) {\ - struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\ - CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\ - }\ - }\ - }\ - pan2 = pan2->above;\ - }\ -} - -/*+------------------------------------------------------------------------- - Remove panel from stack. ----------------------------------------------------------------------------*/ -#define PANEL_UNLINK(pan,err) \ -{ err = ERR;\ - if (pan) {\ - if (IS_LINKED(pan)) {\ - if ((pan)->below)\ - (pan)->below->above = (pan)->above;\ - if ((pan)->above)\ - (pan)->above->below = (pan)->below;\ - if ((pan) == _nc_bottom_panel) \ - _nc_bottom_panel = (pan)->above;\ - if ((pan) == _nc_top_panel) \ - _nc_top_panel = (pan)->below;\ - err = OK;\ - }\ - (pan)->above = (pan)->below = (PANEL*)0;\ - }\ -} - -#define HIDE_PANEL(pan,err,err_if_unlinked)\ - if (IS_LINKED(pan)) {\ - Touchpan(pan);\ - PANEL_UPDATE(pan,(PANEL*)0);\ - PANEL_UNLINK(pan,err);\ - } \ - else {\ - err = err_if_unlinked;\ - } - -#endif /* NCURSES_PANEL_PRIV_H */ |