X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_userptr.c;h=72f2d4ca8f2478e68a87b384b74c514a9c537bb5;hp=45818a3e78fb1b9848af299bd216617baa1e54bc;hb=fae162795e065e5901068152e91f2962b6b247f3;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/menu/m_userptr.c b/menu/m_userptr.c index 45818a3e..72f2d4ca 100644 --- a/menu/m_userptr.c +++ b/menu/m_userptr.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_userptr.c,v 1.10 1999/05/16 17:28:29 juergen Exp $") +MODULE_ID("$Id: m_userptr.c,v 1.21 2020/12/12 00:38:14 tom Exp $") /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_userptr(MENU *menu, void *userptr) -| +| | Description : Set the pointer that is reserved in any menu to store -| application relevant informations. +| application relevant information. | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ -int set_menu_userptr(MENU * menu, void * userptr) +MENU_EXPORT(int) +set_menu_userptr(MENU *menu, void *userptr) { + T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr)); Normalize_Menu(menu)->userptr = userptr; - RETURN( E_OK ); + RETURN(E_OK); } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void *menu_userptr(const MENU *menu) -| +| | Description : Return the pointer that is reserved in any menu to -| store application relevant informations. +| store application relevant information. | | Return Values : Value of the pointer. If no such pointer has been set, | NULL is returned +--------------------------------------------------------------------------*/ -void *menu_userptr(const MENU * menu) +MENU_EXPORT(void *) +menu_userptr(const MENU *menu) { - return( Normalize_Menu(menu)->userptr); + T((T_CALLED("menu_userptr(%p)"), (const void *)menu)); + returnVoidPtr(Normalize_Menu(menu)->userptr); } /* m_userptr.c ends here */