]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_item_use.c
ncurses 6.2 - patch 20200704
[ncurses.git] / menu / m_item_use.c
index 4e36b21a9642da50521d97f2ce0631dad6805452..6bf738a481f26bc7494b3a821264ce75c6466a91 100644 (file)
@@ -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 <Juergen.Pfeifer@T-Online.de> 1995,1997        *
+ *   Author:  Juergen Pfeifer, 1995,1997                                    *
  ****************************************************************************/
 
 /***************************************************************************
 
 #include "menu.priv.h"
 
-MODULE_ID("$Id: m_item_use.c,v 1.8 1998/02/11 12:13:50 tom Exp $")
+MODULE_ID("$Id: m_item_use.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten 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)
+MENU_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)
+MENU_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 */