item_opts_off(ITEM * item, Item_Options opts) { ITEM *citem = item; /* use a copy because set_item_opts must detect NULL item itself to adjust its behavior */ T((T_CALLED("item_opts_off(%p,%d)"), item, opts)); if (opts & ~ALL_ITEM_OPTS) RETURN(E_BAD_ARGUMENT); else { Normalize_Item(citem); opts = citem->opt & ~(opts & ALL_ITEM_OPTS); returnCode(set_item_opts(item, opts)); } }
/* * Item option get/set functions - mitem_opts(3X) man page */ static VALUE rbncurs_c_set_item_opts(VALUE rb_item, VALUE opts) { ITEM *item = get_item(rb_item); return INT2NUM(set_item_opts(item, NUM2INT(opts))); }