X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_use.c;h=3081432751997daee1dd78a1856bcb8c274576f1;hp=2659f4b3f38657eb8ed016c7adfaaa5b13c99fd7;hb=7503e8d82292a2a0a4d8bb55bdf3f8a203159f68;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/menu/m_item_use.c b/menu/m_item_use.c index 2659f4b3..30814327 100644 --- a/menu/m_item_use.c +++ b/menu/m_item_use.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright 2020 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 * @@ -27,7 +28,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,36 +38,40 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_use.c,v 1.10 1999/05/16 17:26:11 juergen Exp $") +MODULE_ID("$Id: m_item_use.c,v 1.19 2020/02/02 23:34:34 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 +--------------------------------------------------------------------------*/ -int set_item_userptr(ITEM * item, void * userptr) +NCURSES_EXPORT(int) +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. +--------------------------------------------------------------------------*/ -void *item_userptr(const ITEM * item) +NCURSES_EXPORT(void *) +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 */