X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_panels.c;h=005483e94f62b7f5eccba19f114cef8f391f2f74;hp=c47f52f242d84d6f77b731b06129801d657d7d1f;hb=d6c65d287166c3105ece4a5e3f3ec7af5a5f26a3;hpb=efa78d11c3ea7f51c7078b64a34c98b44ecb0e1a diff --git a/test/demo_panels.c b/test/demo_panels.c index c47f52f2..005483e9 100644 --- a/test/demo_panels.c +++ b/test/demo_panels.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2007-2018,2019 Free Software Foundation, Inc. * + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2003-2016,2017 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 * @@ -26,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_panels.c,v 1.43 2019/08/24 23:11:01 tom Exp $ + * $Id: demo_panels.c,v 1.45 2020/02/02 23:34:34 tom Exp $ * * Demonstrate a variety of functions from the panel library. */ @@ -204,7 +205,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx) { WINDOW *win; PANEL *pan = 0; - char *userdata = typeMalloc(char, 5); + char *userdata = typeMalloc(char, 6); if ((win = newwin(rows, cols, tly, tlx)) != 0) { keypad(win, TRUE); @@ -222,7 +223,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx) wbkgdset(win, A_BOLD | ' '); } } - _nc_SPRINTF(userdata, _nc_SLIMIT(3) "p%d", color % 8); + _nc_SPRINTF(userdata, _nc_SLIMIT(4) "p%d", color % 8); set_panel_userptr(pan, (NCURSES_CONST void *) userdata); return pan; }