]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - panel/p_user.c
ncurses 6.2 - patch 20210626
[ncurses.git] / panel / p_user.c
index 28b6526bb41c6c84ac6587a29c9444a30d56deae..8d650979f84505a481c7e06d6838fb54b49c6298 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 1998-2005,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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  ****************************************************************************/
 
 /* p_user.c
  ****************************************************************************/
 
 /* p_user.c
- * Set/Get panels user pointer 
+ * Set/Get panels user pointer
  */
 #include "panel.priv.h"
 
  */
 #include "panel.priv.h"
 
-MODULE_ID("$Id: p_user.c,v 1.3 1998/02/11 12:14:01 tom Exp $")
+MODULE_ID("$Id: p_user.c,v 1.11 2021/06/17 21:20:30 tom Exp $")
 
 
-int
-set_panel_userptr(PANEL *pan, NCURSES_CONST void *uptr)
+PANEL_EXPORT(int)
+set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
 {
 {
-  if(!pan)
-    return(ERR);
+  T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr));
+  if (!pan)
+    returnCode(ERR);
   pan->user = uptr;
   pan->user = uptr;
-  return(OK);
+  returnCode(OK);
 }
 
 }
 
-NCURSES_CONST void*
-panel_userptr(const PANEL *pan)
+PANEL_EXPORT(NCURSES_CONST void *)
+panel_userptr(const PANEL * pan)
 {
 {
-  return(pan ? pan->user : (NCURSES_CONST void *)0);
+  T((T_CALLED("panel_userptr(%p)"), (const void *)pan));
+  returnCVoidPtr(pan ? pan->user : (NCURSES_CONST void *)0);
 }
 }
-