X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_menus.c;h=c19d02bb5451c1b170b7144da5fb1a1f3b8605af;hp=aaf39016a8b32b14ff2913548dd903f9aaed1fd2;hb=ba39fbc2e0cee4681395df4079d9e61c27262132;hpb=52aa842907b31bb56fb5133da3f023b45bd4355f diff --git a/test/demo_menus.c b/test/demo_menus.c index aaf39016..c19d02bb 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 2005-2011,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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.31 2010/11/13 20:06:46 tom Exp $ + * $Id: demo_menus.c,v 1.33 2012/01/14 17:20:39 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; } @@ -831,7 +831,7 @@ usage(void) { static const char *const tbl[] = { - "Usage: demo_menus [options]" + "Usage: demo_menus [options] [menu-file]" ,"" ,"Options:" #if HAVE_RIPOFFLINE