diff options
author | rafan <rafan@FreeBSD.org> | 2007-01-20 07:32:02 +0000 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2007-01-20 07:32:02 +0000 |
commit | a35ca3ffa07d253f729abfe49e019438658f9333 (patch) | |
tree | 1351fbc560fb430cd5e493287f4950d583f23af3 /contrib/ncurses/menu/m_items.c | |
parent | 61ebc4fdc6ffaff63296473b0fef0ff5e17067f7 (diff) | |
parent | de9cbef68d4c3ea6cd003ce086e2d3487600ace7 (diff) | |
download | FreeBSD-src-a35ca3ffa07d253f729abfe49e019438658f9333.zip FreeBSD-src-a35ca3ffa07d253f729abfe49e019438658f9333.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r166124,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/ncurses/menu/m_items.c')
-rw-r--r-- | contrib/ncurses/menu/m_items.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/contrib/ncurses/menu/m_items.c b/contrib/ncurses/menu/m_items.c index 3e21d2d..3e8f70b 100644 --- a/contrib/ncurses/menu/m_items.c +++ b/contrib/ncurses/menu/m_items.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2005 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_items.c,v 1.9 2000/12/10 02:16:48 tom Exp $") +MODULE_ID("$Id: m_items.c,v 1.16 2005/01/16 01:02:23 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -53,39 +53,42 @@ MODULE_ID("$Id: m_items.c,v 1.9 2000/12/10 02:16:48 tom Exp $") | passed to the function +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_menu_items (MENU * menu, ITEM ** items) +set_menu_items(MENU * menu, ITEM ** items) { + T((T_CALLED("set_menu_items(%p,%p)"), menu, items)); + if (!menu || (items && !(*items))) RETURN(E_BAD_ARGUMENT); - - if ( menu->status & _POSTED ) + + if (menu->status & _POSTED) RETURN(E_POSTED); - + if (menu->items) _nc_Disconnect_Items(menu); - + if (items) { - if(!_nc_Connect_Items( menu, items )) + if (!_nc_Connect_Items(menu, items)) RETURN(E_CONNECTED); } - + menu->items = items; RETURN(E_OK); -} +} /*--------------------------------------------------------------------------- | Facility : libnmenu | Function : ITEM **menu_items(const MENU *menu) | -| Description : Returns a pointer to the item pointer arry of the menu +| Description : Returns a pointer to the item pointer array of the menu | | Return Values : NULL on error +--------------------------------------------------------------------------*/ NCURSES_EXPORT(ITEM **) -menu_items (const MENU *menu) +menu_items(const MENU * menu) { - return(menu ? menu->items : (ITEM **)0); + T((T_CALLED("menu_items(%p)"), menu)); + returnItemPtr(menu ? menu->items : (ITEM **) 0); } /*--------------------------------------------------------------------------- @@ -98,9 +101,10 @@ menu_items (const MENU *menu) | Return Values : Number of items or -1 to indicate error. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -item_count (const MENU *menu) +item_count(const MENU * menu) { - return(menu ? menu->nitems : -1); + T((T_CALLED("item_count(%p)"), menu)); + returnCode(menu ? menu->nitems : -1); } /* m_items.c ends here */ |