xref: /netbsd-src/lib/libpanel/setuser.c (revision 5858a2db3d97dad7cb7e5425098a662ce159ce31)
1*5858a2dbSuwe /*	$NetBSD: setuser.c,v 1.1 2015/10/26 23:09:49 uwe Exp $ */
2*5858a2dbSuwe 
3*5858a2dbSuwe /*
4*5858a2dbSuwe  * Copyright (c) 2015 Valery Ushakov
5*5858a2dbSuwe  * All rights reserved.
6*5858a2dbSuwe  *
7*5858a2dbSuwe  * Redistribution and use in source and binary forms, with or without
8*5858a2dbSuwe  * modification, are permitted provided that the following conditions
9*5858a2dbSuwe  * are met:
10*5858a2dbSuwe  * 1. Redistributions of source code must retain the above copyright
11*5858a2dbSuwe  *    notice, this list of conditions and the following disclaimer.
12*5858a2dbSuwe  * 2. Redistributions in binary form must reproduce the above copyright
13*5858a2dbSuwe  *    notice, this list of conditions and the following disclaimer in the
14*5858a2dbSuwe  *    documentation and/or other materials provided with the distribution.
15*5858a2dbSuwe  *
16*5858a2dbSuwe  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17*5858a2dbSuwe  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18*5858a2dbSuwe  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19*5858a2dbSuwe  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20*5858a2dbSuwe  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21*5858a2dbSuwe  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22*5858a2dbSuwe  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23*5858a2dbSuwe  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24*5858a2dbSuwe  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25*5858a2dbSuwe  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*5858a2dbSuwe  */
27*5858a2dbSuwe 
28*5858a2dbSuwe #include <sys/cdefs.h>
29*5858a2dbSuwe __RCSID("$NetBSD: setuser.c,v 1.1 2015/10/26 23:09:49 uwe Exp $");
30*5858a2dbSuwe 
31*5858a2dbSuwe #include "panel_impl.h"
32*5858a2dbSuwe 
33*5858a2dbSuwe 
34*5858a2dbSuwe int
set_panel_userptr(PANEL * p,char * u)35*5858a2dbSuwe set_panel_userptr(PANEL *p, char *u)
36*5858a2dbSuwe {
37*5858a2dbSuwe 	if (p == NULL)
38*5858a2dbSuwe 		return ERR;
39*5858a2dbSuwe 
40*5858a2dbSuwe 	p->user = u;
41*5858a2dbSuwe 	return OK;
42*5858a2dbSuwe }
43