1*15fe46beSmillert /* $OpenBSD: p_user.c,v 1.1 1997/12/03 05:17:55 millert Exp $ */ 2*15fe46beSmillert 3*15fe46beSmillert /*************************************************************************** 4*15fe46beSmillert * COPYRIGHT NOTICE * 5*15fe46beSmillert **************************************************************************** 6*15fe46beSmillert * panels is copyright (C) 1995 * 7*15fe46beSmillert * Zeyd M. Ben-Halim * 8*15fe46beSmillert * zmbenhal@netcom.com * 9*15fe46beSmillert * Eric S. Raymond * 10*15fe46beSmillert * esr@snark.thyrsus.com * 11*15fe46beSmillert * * 12*15fe46beSmillert * All praise to the original author, Warren Tucker. * 13*15fe46beSmillert * * 14*15fe46beSmillert * Permission is hereby granted to reproduce and distribute panels * 15*15fe46beSmillert * by any means and for any fee, whether alone or as part of a * 16*15fe46beSmillert * larger distribution, in source or in binary form, PROVIDED * 17*15fe46beSmillert * this notice is included with any such distribution, and is not * 18*15fe46beSmillert * removed from any of its header files. Mention of panels in any * 19*15fe46beSmillert * applications linked with it is highly appreciated. * 20*15fe46beSmillert * * 21*15fe46beSmillert * panels comes AS IS with no warranty, implied or expressed. * 22*15fe46beSmillert * * 23*15fe46beSmillert ***************************************************************************/ 24*15fe46beSmillert 25*15fe46beSmillert /* p_user.c 26*15fe46beSmillert * Set/Get panels user pointer 27*15fe46beSmillert */ 28*15fe46beSmillert #include "panel.priv.h" 29*15fe46beSmillert 30*15fe46beSmillert MODULE_ID("Id: p_user.c,v 1.2 1997/11/08 18:30:08 tom Exp $") 31*15fe46beSmillert 32*15fe46beSmillert int 33*15fe46beSmillert set_panel_userptr(PANEL *pan, NCURSES_CONST void *uptr) 34*15fe46beSmillert { 35*15fe46beSmillert if(!pan) 36*15fe46beSmillert return(ERR); 37*15fe46beSmillert pan->user = uptr; 38*15fe46beSmillert return(OK); 39*15fe46beSmillert } 40*15fe46beSmillert 41*15fe46beSmillert NCURSES_CONST void* 42*15fe46beSmillert panel_userptr(const PANEL *pan) 43*15fe46beSmillert { 44*15fe46beSmillert return(pan ? pan->user : (NCURSES_CONST void *)0); 45*15fe46beSmillert } 46*15fe46beSmillert 47