diff options
Diffstat (limited to 'panel')
| -rw-r--r-- | panel/Makefile.in | 28 | ||||
| -rw-r--r-- | panel/p_above.c | 16 | ||||
| -rw-r--r-- | panel/p_below.c | 18 | ||||
| -rw-r--r-- | panel/p_new.c | 6 | ||||
| -rw-r--r-- | panel/panel.c | 18 | ||||
| -rw-r--r-- | panel/panel.priv.h | 6 |
6 files changed, 53 insertions, 39 deletions
diff --git a/panel/Makefile.in b/panel/Makefile.in index 380f80cf2d59..53abc3625f57 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.76 2021/07/03 15:45:33 tom Exp $ +# $Id: Makefile.in,v 1.81 2025/10/25 18:00:30 tom Exp $ ############################################################################## -# Copyright 2020,2021 Thomas E. Dickey # +# Copyright 2020-2024,2025 Thomas E. Dickey # # Copyright 1998-2015,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -47,11 +47,14 @@ SHELL = @SHELL@ VPATH = @srcdir@ THIS = Makefile +@SET_MAKE@ +@SET_DESTDIR@ +TOP_MFLAGS = DESTDIR="$(DESTDIR)" RPATH_LIST="$(RPATH_LIST)" + x = @EXEEXT@ o = .@OBJEXT@ MODEL = @DFT_LWR_MODEL@ -DESTDIR = @DESTDIR@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ prefix = @prefix@ @@ -63,7 +66,9 @@ datarootdir = @datarootdir@ datadir = @datadir@ includesubdir = @includesubdir@ -INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir) +INCLUDEDIR = $(DESTDIR)$(includedir@MERGE_PREFIX@)$(includesubdir) +BINDIR = $(DESTDIR)$(bindir@MERGE_PREFIX@) +LIBDIR = $(DESTDIR)$(libdir@MERGE_PREFIX@) PACKAGE = @PACKAGE@ @@ -112,7 +117,7 @@ LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib -SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ +SHLIB_LIST = $(SHLIB_DIRS) -lncurses@ABI_SUFFIX@ @SHLIB_LIST@ RPATH_LIST = @RPATH_LIST@ RESULTING_SYMS = @RESULTING_SYMS@ @@ -153,10 +158,13 @@ all \ libs \ install :: $(AUTO_SRC) $(LIBRARIES) +check :: + @echo "no unit-test implemented" + sources: $(AUTO_SRC) -$(DESTDIR)$(bindir) \ -$(DESTDIR)$(libdir) : +$(BINDIR) \ +$(LIBDIR) : mkdir -p $@ # make a copy to simplify include-paths while still keeping panel's include @@ -201,6 +209,12 @@ distclean :: clean realclean :: distclean +# These rules are used to allow "make -n" to work on a clean directory-tree +../include/curses.h \ +../include/ncurses_def.h \ +../include/term.h : + ( cd ../include && $(MAKE) $(TOP_MFLAGS) ) + ############################################################################### # The remainder of this file is automatically generated during configuration ############################################################################### diff --git a/panel/p_above.c b/panel/p_above.c index 2a6fde55cdc8..7e30f639bafc 100644 --- a/panel/p_above.c +++ b/panel/p_above.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2024 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,11 +37,11 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_above.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: p_above.c,v 1.12 2024/12/07 23:05:20 tom Exp $") #if NCURSES_SP_FUNCS PANEL_EXPORT(PANEL *) -ground_panel(SCREEN * sp) +ground_panel(SCREEN *sp) { T((T_CALLED("ground_panel(%p)"), (void *)sp)); if (sp) @@ -51,12 +51,12 @@ ground_panel(SCREEN * sp) if (_nc_bottom_panel) /* this is the pseudo panel */ returnPanel(_nc_bottom_panel->above); else - returnPanel(0); + returnPanel(NULL); } else { - if (0 == CURRENT_SCREEN) - returnPanel(0); + if (NULL == CURRENT_SCREEN) + returnPanel(NULL); else returnPanel(ground_panel(CURRENT_SCREEN)); } @@ -64,7 +64,7 @@ ground_panel(SCREEN * sp) #endif PANEL_EXPORT(PANEL *) -panel_above(const PANEL * pan) +panel_above(const PANEL *pan) { PANEL *result; @@ -78,7 +78,7 @@ panel_above(const PANEL * pan) #else /* if top and bottom are equal, we have no or only the pseudo panel; if not, we return the panel above the pseudo panel */ - result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above; + result = EMPTY_STACK()? (PANEL *)0 : _nc_bottom_panel->above; #endif } returnPanel(result); diff --git a/panel/p_below.c b/panel/p_below.c index 100393d53a72..7597394224c5 100644 --- a/panel/p_below.c +++ b/panel/p_below.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2024 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,11 +37,11 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_below.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $") +MODULE_ID("$Id: p_below.c,v 1.12 2024/12/07 23:05:20 tom Exp $") #if NCURSES_SP_FUNCS PANEL_EXPORT(PANEL *) -ceiling_panel(SCREEN * sp) +ceiling_panel(SCREEN *sp) { T((T_CALLED("ceiling_panel(%p)"), (void *)sp)); if (sp) @@ -49,12 +49,12 @@ ceiling_panel(SCREEN * sp) struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp); /* if top and bottom are equal, we have no or only the pseudo panel */ - returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel); + returnPanel(EMPTY_STACK()? (PANEL *)0 : _nc_top_panel); } else { - if (0 == CURRENT_SCREEN) - returnPanel(0); + if (NULL == CURRENT_SCREEN) + returnPanel(NULL); else returnPanel(ceiling_panel(CURRENT_SCREEN)); } @@ -62,7 +62,7 @@ ceiling_panel(SCREEN * sp) #endif PANEL_EXPORT(PANEL *) -panel_below(const PANEL * pan) +panel_below(const PANEL *pan) { PANEL *result; @@ -71,7 +71,7 @@ panel_below(const PANEL * pan) { GetHook(pan); /* we must not return the pseudo panel */ - result = Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below; + result = Is_Pseudo(pan->below) ? (PANEL *)0 : pan->below; } else { @@ -79,7 +79,7 @@ panel_below(const PANEL * pan) result = ceiling_panel(CURRENT_SCREEN); #else /* if top and bottom are equal, we have no or only the pseudo panel */ - result = EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel; + result = EMPTY_STACK()? (PANEL *)0 : _nc_top_panel; #endif } returnPanel(result); diff --git a/panel/p_new.c b/panel/p_new.c index cf1164034f36..b5c198bc91de 100644 --- a/panel/p_new.c +++ b/panel/p_new.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2024 Thomas E. Dickey * * Copyright 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -39,7 +39,7 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_new.c,v 1.24 2021/10/23 15:12:06 tom Exp $") +MODULE_ID("$Id: p_new.c,v 1.25 2024/12/07 23:00:37 tom Exp $") #ifdef TRACE static char *stdscr_id; @@ -86,7 +86,7 @@ root_panel(NCURSES_SP_DCL0) ph->destroy = del_panel; #endif _nc_stdscr_pseudo_panel = AllocPanel("root_panel"); - if (_nc_stdscr_pseudo_panel != 0) + if (_nc_stdscr_pseudo_panel != NULL) { PANEL *pan = _nc_stdscr_pseudo_panel; WINDOW *win = SP_PARM->_stdscr; diff --git a/panel/panel.c b/panel/panel.c index 1b2d6e8349a0..39730d454302 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2024 Thomas E. Dickey * * Copyright 1998-2010,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,14 +37,14 @@ /* panel.c -- implementation of panels library, some core routines */ #include "panel.priv.h" -MODULE_ID("$Id: panel.c,v 1.30 2020/09/26 18:05:17 tom Exp $") +MODULE_ID("$Id: panel.c,v 1.31 2024/12/07 23:05:20 tom Exp $") /*+------------------------------------------------------------------------- _nc_retrace_panel (pan) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(PANEL *) -_nc_retrace_panel(PANEL * pan) +_nc_retrace_panel(PANEL *pan) { T((T_RETURN("%p"), (void *)pan)); return pan; @@ -61,7 +61,7 @@ _nc_my_visbuf(const void *ptr, int n) { char temp[32]; - if (ptr != 0) + if (ptr != NULL) _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%p", ptr); else _nc_STRCPY(temp, "<null>", sizeof(temp)); @@ -75,7 +75,7 @@ _nc_my_visbuf(const void *ptr, int n) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(void) -_nc_dPanel(const char *text, const PANEL * pan) +_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, 1), @@ -90,7 +90,7 @@ _nc_dPanel(const char *text, const PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(void) -_nc_dStack(const char *fmt, int num, const PANEL * pan) +_nc_dStack(const char *fmt, int num, const PANEL *pan) { char s80[80]; @@ -116,7 +116,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(void) -_nc_Wnoutrefresh(const PANEL * pan) +_nc_Wnoutrefresh(const PANEL *pan) { dPanel("wnoutrefresh", pan); wnoutrefresh(pan->win); @@ -128,7 +128,7 @@ _nc_Wnoutrefresh(const PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(void) -_nc_Touchpan(const PANEL * pan) +_nc_Touchpan(const PANEL *pan) { dPanel("Touchpan", pan); touchwin(pan->win); @@ -140,7 +140,7 @@ _nc_Touchpan(const PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE PANEL_EXPORT(void) -_nc_Touchline(const PANEL * pan, int start, int count) +_nc_Touchline(const PANEL *pan, int start, int count) { char s80[80]; diff --git a/panel/panel.priv.h b/panel/panel.priv.h index 029a4f33cd8d..49eadf98f2cf 100644 --- a/panel/panel.priv.h +++ b/panel/panel.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020 Thomas E. Dickey * + * Copyright 2020,2024 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ -/* $Id: panel.priv.h,v 1.30 2020/09/26 18:05:32 tom Exp $ */ +/* $Id: panel.priv.h,v 1.31 2024/12/07 23:01:42 tom Exp $ */ #ifndef NCURSES_PANEL_PRIV_H #define NCURSES_PANEL_PRIV_H 1 @@ -86,7 +86,7 @@ struct screen; /* forward declaration */ #define GetScreenHook(sp) \ struct panelhook* ph = NCURSES_SP_NAME(_nc_panelhook)(sp) #define GetPanelHook(pan) \ - GetScreenHook(pan ? _nc_screen_of((pan)->win) : 0) + GetScreenHook(pan ? _nc_screen_of((pan)->win) : NULL) #define GetWindowHook(win) \ SCREEN* sp = _nc_screen_of(win); \ GetScreenHook(sp) |
