X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_val.c;h=455987ffdb41d104e6823ca11639c867286c259b;hp=cebf693fbd349cff41248b46ee1fa40d428b4623;hb=d30f99439fcc8d4bb4c38e5c4afb4f6555fc6ad4;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/menu/m_item_val.c b/menu/m_item_val.c index cebf693f..455987ff 100644 --- a/menu/m_item_val.c +++ b/menu/m_item_val.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * + * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 1998-2004,2010 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 * @@ -37,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_val.c,v 1.14 2004/12/11 23:29:34 tom Exp $") +MODULE_ID("$Id: m_item_val.c,v 1.19 2021/03/27 23:46:29 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -52,15 +53,13 @@ MODULE_ID("$Id: m_item_val.c,v 1.14 2004/12/11 23:29:34 tom Exp $") | Return Values : E_OK - success | E_REQUEST_DENIED - not selectable or single valued menu +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) -set_item_value(ITEM * item, bool value) +MENU_EXPORT(int) +set_item_value(ITEM *item, bool value) { - MENU *menu; - - T((T_CALLED("set_item_value(%p,%d)"), item, value)); + T((T_CALLED("set_item_value(%p,%d)"), (void *)item, value)); if (item) { - menu = item->imenu; + MENU *menu = item->imenu; if ((!(item->opt & O_SELECTABLE)) || (menu && (menu->opt & O_ONEVALUE))) @@ -94,10 +93,10 @@ set_item_value(ITEM * item, bool value) | Return Values : TRUE - if item is selected | FALSE - if item is not selected +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(bool) -item_value(const ITEM * item) +MENU_EXPORT(bool) +item_value(const ITEM *item) { - T((T_CALLED("item_value(%p)"), item)); + T((T_CALLED("item_value(%p)"), (const void *)item)); returnBool((Normalize_Item(item)->value) ? TRUE : FALSE); }