X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_use.c;h=7cea30c92ff8b5566c7bf072c4970a3a8c52c286;hp=4f52ea1aca1829701decff535b8bb748db5c730d;hb=c55d387cebf1cee4757ca2c2ef4fbeae59ee4175;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/menu/m_item_use.c b/menu/m_item_use.c index 4f52ea1a..7cea30c9 100644 --- a/menu/m_item_use.c +++ b/menu/m_item_use.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2020 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /*************************************************************************** @@ -38,38 +37,40 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_use.c,v 1.12 2002/07/06 15:22:16 juergen Exp $") +MODULE_ID("$Id: m_item_use.c,v 1.18 2020/01/18 17:02:13 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_userptr(ITEM *item, void *userptr) -| +| | Description : Set the pointer that is reserved in any item to store -| application relevant informations. +| application relevant information. | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_item_userptr (ITEM * item, void * userptr) +set_item_userptr(ITEM * item, void *userptr) { + T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr)); Normalize_Item(item)->userptr = userptr; - RETURN( E_OK ); + RETURN(E_OK); } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void *item_userptr(const ITEM *item) -| +| | Description : Return the pointer that is reserved in any item to store -| application relevant informations. +| application relevant information. | | Return Values : Value of the pointer. If no such pointer has been set, | NULL is returned. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(void *) -item_userptr (const ITEM * item) +item_userptr(const ITEM * item) { - return Normalize_Item(item)->userptr; + T((T_CALLED("item_userptr(%p)"), (const void *)item)); + returnVoidPtr(Normalize_Item(item)->userptr); } /* m_item_use.c */