]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_menus.c
ncurses 5.7 - patch 20110115
[ncurses.git] / test / demo_menus.c
index 4625ef672fdbe78ed8d21b3cf704c17198771bfd..4f758079e793998d8e27873963b250941490fe84 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2005-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 2005-2010,2011 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.30 2010/05/01 19:12:26 tom Exp $
+ * $Id: demo_menus.c,v 1.32 2011/01/15 20:02:47 tom Exp $
  *
  * Demonstrate a variety of functions from the menu library.
  * Thomas Dickey - 2005/4/9
@@ -202,7 +202,7 @@ menu_offset(MenuNo number)
 #endif
 
        /* FIXME: MENU.itemlen seems the only way to get actual width of items */
-       result = (number - (eBanner + 1)) * (mpBanner->itemlen + spc_rows);
+       result = (number - (eBanner + 1)) * (menu_itemwidth(mpBanner) + spc_rows);
     }
     return result;
 }
@@ -547,7 +547,7 @@ perform_trace_menu(int cmd)
            Trace(("trace level interactively set to %s", tracetrace(_nc_tracing)));
 
            MvPrintw(LINES - 2, 0,
-                           "Trace level is %s\n", tracetrace(_nc_tracing));
+                    "Trace level is %s\n", tracetrace(_nc_tracing));
            refresh();
        }
     }