191100Sdes/****************************************************************************
2115619Sdes * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
3228690Sdes *                                                                          *
491100Sdes * Permission is hereby granted, free of charge, to any person obtaining a  *
591100Sdes * copy of this software and associated documentation files (the            *
691100Sdes * "Software"), to deal in the Software without restriction, including      *
799158Sdes * without limitation the rights to use, copy, modify, merge, publish,      *
899158Sdes * distribute, distribute with modifications, sublicense, and/or sell       *
999158Sdes * copies of the Software, and to permit persons to whom the Software is    *
1091100Sdes * furnished to do so, subject to the following conditions:                 *
1191100Sdes *                                                                          *
1291100Sdes * The above copyright notice and this permission notice shall be included  *
1391100Sdes * in all copies or substantial portions of the Software.                   *
1491100Sdes *                                                                          *
1591100Sdes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
1691100Sdes * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
1791100Sdes * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
1891100Sdes * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
1991100Sdes * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
2091100Sdes * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
2191100Sdes * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
2291100Sdes *                                                                          *
2391100Sdes * Except as contained in this notice, the name(s) of the above copyright   *
2491100Sdes * holders shall not be used in advertising or otherwise to promote the     *
2591100Sdes * sale, use or other dealings in this Software without prior written       *
2691100Sdes * authorization.                                                           *
2791100Sdes ****************************************************************************/
2891100Sdes
2991100Sdes/****************************************************************************
3091100Sdes *   Author:  Juergen Pfeifer, 1995,1997                                    *
3191100Sdes ****************************************************************************/
3291100Sdes
3391100Sdes/***************************************************************************
3491100Sdes* Module m_item_nam                                                        *
35255376Sdes* Get menus item name and description                                      *
3691100Sdes***************************************************************************/
3791100Sdes
38228690Sdes#include "menu.priv.h"
39228690Sdes
40228690SdesMODULE_ID("$Id: m_item_nam.c,v 1.14 2004/12/25 21:41:54 tom Exp $")
41228690Sdes
4291100Sdes/*---------------------------------------------------------------------------
4391100Sdes|   Facility      :  libnmenu
4491100Sdes|   Function      :  char *item_name(const ITEM *item)
4591100Sdes|
4691100Sdes|   Description   :  Return name of menu item
4791100Sdes|
4891100Sdes|   Return Values :  See above; returns NULL if item is invalid
4991100Sdes+--------------------------------------------------------------------------*/
5091100SdesNCURSES_EXPORT(const char *)
5191100Sdesitem_name(const ITEM * item)
5291100Sdes{
5391100Sdes  T((T_CALLED("item_name(%p)"), item));
5491100Sdes  returnCPtr((item) ? item->name.str : (char *)0);
5591100Sdes}
5691100Sdes
5791100Sdes/*---------------------------------------------------------------------------
5891100Sdes|   Facility      :  libnmenu
5991100Sdes|   Function      :  char *item_description(const ITEM *item)
6091100Sdes|
61107937Sdes|   Description   :  Returns description of item
62107937Sdes|
6391100Sdes|   Return Values :  See above; Returns NULL if item is invalid
6491100Sdes+--------------------------------------------------------------------------*/
6591100SdesNCURSES_EXPORT(const char *)
6691100Sdesitem_description(const ITEM * item)
6791100Sdes{
6891100Sdes  T((T_CALLED("item_description(%p)"), item));
6991100Sdes  returnCPtr((item) ? item->description.str : (char *)0);
7091100Sdes}
7191100Sdes
7291100Sdes/* m_item_nam.c ends here */
7391100Sdes