m_item_nam.c revision 1.2
1/*-----------------------------------------------------------------------------+ 2| The ncurses menu library is Copyright (C) 1995-1997 | 3| by Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> | 4| All Rights Reserved. | 5| | 6| Permission to use, copy, modify, and distribute this software and its | 7| documentation for any purpose and without fee is hereby granted, provided | 8| that the above copyright notice appear in all copies and that both that | 9| copyright notice and this permission notice appear in supporting | 10| documentation, and that the name of the above listed copyright holder(s) not | 11| be used in advertising or publicity pertaining to distribution of the | 12| software without specific, written prior permission. | 13| | 14| THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO | 15| THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- | 16| NESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR | 17| ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RE- | 18| SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | 19| NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH | 20| THE USE OR PERFORMANCE OF THIS SOFTWARE. | 21+-----------------------------------------------------------------------------*/ 22 23/*************************************************************************** 24* Module menu_item_nam * 25* Get menus item name and description * 26***************************************************************************/ 27 28#include "menu.priv.h" 29 30MODULE_ID("Id: m_item_nam.c,v 1.5 1997/05/01 16:47:26 juergen Exp $") 31 32/*--------------------------------------------------------------------------- 33| Facility : libnmenu 34| Function : char *item_name(const ITEM *item) 35| 36| Description : Return name of menu item 37| 38| Return Values : See above; returns NULL if item is invalid 39+--------------------------------------------------------------------------*/ 40const char *item_name(const ITEM * item) 41{ 42 return ((item) ? item->name.str : (char *)0); 43} 44 45/*--------------------------------------------------------------------------- 46| Facility : libnmenu 47| Function : char *item_description(const ITEM *item) 48| 49| Description : Returns description of item 50| 51| Return Values : See above; Returns NULL if item is invalid 52+--------------------------------------------------------------------------*/ 53const char *item_description(const ITEM * item) 54{ 55 return ((item) ? item->description.str : (char *)0); 56} 57 58/* m_item_nam.c ends here */ 59