X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_opts.c;h=e5cd996d06b52463c1aa28d5ffdc7f39dcb8eeeb;hp=98af32f57099c41c8f668a3756887884656119ea;hb=b1f61d9f3aa244512045a6b02e759825d7049d34;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/form/fld_opts.c b/form/fld_opts.c index 98af32f5..e5cd996d 100644 --- a/form/fld_opts.c +++ b/form/fld_opts.c @@ -27,11 +27,11 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_opts.c,v 1.2 1998/02/11 12:13:44 tom Exp $") +MODULE_ID("$Id: fld_opts.c,v 1.6 1999/05/16 17:19:06 juergen Exp $") /*---------------------------------------------------------------------------- Field-Options manipulation routines @@ -52,6 +52,7 @@ MODULE_ID("$Id: fld_opts.c,v 1.2 1998/02/11 12:13:44 tom Exp $") int set_field_opts(FIELD * field, Field_Options opts) { int res = E_BAD_ARGUMENT; + opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) res = _nc_Synchronize_Options( Normalize_Field(field), opts ); RETURN(res); @@ -86,6 +87,7 @@ int field_opts_on(FIELD * field, Field_Options opts) { int res = E_BAD_ARGUMENT; + opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) { Normalize_Field( field ); @@ -110,6 +112,7 @@ int field_opts_off(FIELD * field, Field_Options opts) { int res = E_BAD_ARGUMENT; + opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) { Normalize_Field( field );