]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_panels.c
ncurses 6.2 - patch 20200212
[ncurses.git] / test / demo_panels.c
index c47f52f242d84d6f77b731b06129801d657d7d1f..005483e94f62b7f5eccba19f114cef8f391f2f74 100644 (file)
@@ -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;
 }