]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_userptr.c
ncurses 6.1 - patch 20200118
[ncurses.git] / menu / m_userptr.c
index 908758b1d385151b4800438c60591b80e6da640b..3172a57fa1aa88551b645c19b12eaeee1f151507 100644 (file)
@@ -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             *
  ****************************************************************************/
 
 /***************************************************************************
 
 #include "menu.priv.h"
 
-MODULE_ID("$Id: m_userptr.c,v 1.12 2002/07/06 15:22:16 juergen Exp $")
+MODULE_ID("$Id: m_userptr.c,v 1.18 2020/01/18 17:04:37 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
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(int)
-set_menu_userptr (MENU * menu, void * userptr)
+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
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(void *)
-menu_userptr (const MENU * menu)
+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 */