X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=panel%2Fpanel.c;h=0d152056f33ea85e33beeb5aa2c331b3dad46155;hp=8ef39847b343cc460805be66d27c6c4d5c704882;hb=2b7c2fd2f9d58719770902ce4d0d0aeb87b284f7;hpb=fc79b49bd8a9c5e4db287514cdac46e1691cf48a diff --git a/panel/panel.c b/panel/panel.c index 8ef39847..0d152056 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2010,2012 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 * @@ -36,16 +37,16 @@ /* panel.c -- implementation of panels library, some core routines */ #include "panel.priv.h" -MODULE_ID("$Id: panel.c,v 1.24 2009/04/11 21:29:10 tom Exp $") +MODULE_ID("$Id: panel.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $") /*+------------------------------------------------------------------------- _nc_retrace_panel (pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) _nc_retrace_panel(PANEL * pan) { - T((T_RETURN("%p"), pan)); + T((T_RETURN("%p"), (void *)pan)); return pan; } #endif @@ -55,15 +56,15 @@ _nc_retrace_panel(PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE #ifndef TRACE_TXT -NCURSES_EXPORT(const char *) +PANEL_EXPORT(const char *) _nc_my_visbuf(const void *ptr) { char temp[32]; if (ptr != 0) - sprintf(temp, "ptr:%p", ptr); + _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "ptr:%p", ptr); else - strcpy(temp, ""); + _nc_STRCPY(temp, "", sizeof(temp)); return _nc_visbuf(temp); } #endif @@ -73,7 +74,7 @@ _nc_my_visbuf(const void *ptr) dPanel(text,pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_dPanel(const char *text, const PANEL * pan) { _tracef("%s id=%s b=%s a=%s y=%d x=%d", @@ -88,14 +89,14 @@ _nc_dPanel(const char *text, const PANEL * pan) dStack(fmt,num,pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_dStack(const char *fmt, int num, const PANEL * pan) { char s80[80]; GetPanelHook(pan); - sprintf(s80, fmt, num, pan); + _nc_SPRINTF(s80, _nc_SLIMIT(sizeof(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) : "--"); @@ -114,7 +115,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan) Wnoutrefresh(pan) - debugging hook for wnoutrefresh --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Wnoutrefresh(const PANEL * pan) { dPanel("wnoutrefresh", pan); @@ -126,7 +127,7 @@ _nc_Wnoutrefresh(const PANEL * pan) Touchpan(pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Touchpan(const PANEL * pan) { dPanel("Touchpan", pan); @@ -138,12 +139,12 @@ _nc_Touchpan(const PANEL * pan) Touchline(pan,start,count) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Touchline(const PANEL * pan, int start, int count) { char s80[80]; - sprintf(s80, "Touchline s=%d c=%d", start, count); + _nc_SPRINTF(s80, _nc_SLIMIT(sizeof(s80)) "Touchline s=%d c=%d", start, count); dPanel(s80, pan); touchline(pan->win, start, count); }