]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_menus.c
ncurses 5.9 - patch 20140823
[ncurses.git] / test / demo_menus.c
index 803482ecc70c9d153d7a73d95f3b9b8a55f3572f..28a34a1c9979a3dcc7bf6b71f19fa11a5b90d41b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2005-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 2005-2013,2014 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 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_menus.c,v 1.50 2013/06/08 21:38:37 tom Exp $
+ * $Id: demo_menus.c,v 1.53 2014/08/02 17:24:07 tom Exp $
  *
  * Demonstrate a variety of functions from the menu library.
  * Thomas Dickey - 2005/4/9
@@ -315,7 +315,7 @@ menu_destroy(MENU * m)
        if ((count > 0) && (m == mpSelect)) {
            if (blob && loaded_file) {
                Trace(("freeing blob %p", blob));
-               free((char *) blob);
+               free((void *) blob);
            }
            free(items);
            items = 0;
@@ -407,7 +407,7 @@ build_select_menu(MenuNo number, char *filename)
     MENU_DATA *ap = 0;
     MENU_DATA *myList = 0;
     int i;
-    unsigned count = 0;
+    size_t count = 0;
 
     if (filename != 0) {
        struct stat sb;
@@ -595,7 +595,7 @@ perform_trace_menu(int cmd)
     int result;
 
     for (ip = menu_items(mpTrace); *ip; ip++) {
-       MENU_DATA *td = item_userptr(*ip);
+       MENU_DATA *td = (MENU_DATA *) item_userptr(*ip);
        unsigned mask = td->mask;
        if (mask == 0)
            set_item_value(*ip, _nc_tracing == 0);
@@ -610,7 +610,7 @@ perform_trace_menu(int cmd)
            newtrace = 0;
            for (ip = menu_items(mpTrace); *ip; ip++) {
                if (item_value(*ip)) {
-                   MENU_DATA *td = item_userptr(*ip);
+                   MENU_DATA *td = (MENU_DATA *) item_userptr(*ip);
                    newtrace |= td->mask;
                }
            }
@@ -859,7 +859,7 @@ perform_menus(void)
        if (code == E_UNKNOWN_COMMAND
            || code == E_NOT_POSTED) {
            ITEM *item = current_item(last_menu);
-           MENU_DATA *td = item_userptr(item);
+           MENU_DATA *td = (MENU_DATA *) item_userptr(item);
            td->func((int) td->mask);
        }
        if (code == E_REQUEST_DENIED)