X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_opts.c;fp=menu%2Fm_opts.c;h=1875f418755b12aea940edd1c17e0eaf0c794042;hp=2de719d20c20473e858b262c966ceeda06c78439;hb=0eb88fc5281804773e2a0c7a488a4452463535ce;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/menu/m_opts.c b/menu/m_opts.c index 2de719d2..1875f418 100644 --- a/menu/m_opts.c +++ b/menu/m_opts.c @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_opts.c,v 1.8 1998/02/11 12:13:49 tom Exp $") +MODULE_ID("$Id: m_opts.c,v 1.12 1999/05/16 17:27:08 juergen Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -54,6 +54,8 @@ MODULE_ID("$Id: m_opts.c,v 1.8 1998/02/11 12:13:49 tom Exp $") +--------------------------------------------------------------------------*/ int set_menu_opts(MENU * menu, Menu_Options opts) { + opts &= ALL_MENU_OPTS; + if (opts & ~ALL_MENU_OPTS) RETURN(E_BAD_ARGUMENT); @@ -112,6 +114,7 @@ int menu_opts_off(MENU *menu, Menu_Options opts) MENU *cmenu = menu; /* use a copy because set_menu_opts must detect NULL menu itself to adjust its behaviour */ + opts &= ALL_MENU_OPTS; if (opts & ~ALL_MENU_OPTS) RETURN(E_BAD_ARGUMENT); else @@ -140,6 +143,7 @@ int menu_opts_on(MENU * menu, Menu_Options opts) MENU *cmenu = menu; /* use a copy because set_menu_opts must detect NULL menu itself to adjust its behaviour */ + opts &= ALL_MENU_OPTS; if (opts & ~ALL_MENU_OPTS) RETURN(E_BAD_ARGUMENT); else