1afad76eobrien/*	$NetBSD: sprite.h,v 1.1 1999/11/23 05:28:22 mrg Exp $	*/
2afad76eobrien
39da7bddpfg/*-
49da7bddpfg * SPDX-License-Identifier: BSD-4-Clause
59da7bddpfg *
6afad76eobrien * Copyright (c) 1988, 1989, 1990, 1993
7afad76eobrien *	The Regents of the University of California.  All rights reserved.
8afad76eobrien * Copyright (c) 1989 by Berkeley Softworks
9afad76eobrien * All rights reserved.
10afad76eobrien *
11afad76eobrien * This code is derived from software contributed to Berkeley by
12afad76eobrien * Adam de Boor.
13afad76eobrien *
14afad76eobrien * Redistribution and use in source and binary forms, with or without
15afad76eobrien * modification, are permitted provided that the following conditions
16afad76eobrien * are met:
17afad76eobrien * 1. Redistributions of source code must retain the above copyright
18afad76eobrien *    notice, this list of conditions and the following disclaimer.
19afad76eobrien * 2. Redistributions in binary form must reproduce the above copyright
20afad76eobrien *    notice, this list of conditions and the following disclaimer in the
21afad76eobrien *    documentation and/or other materials provided with the distribution.
22afad76eobrien * 3. All advertising materials mentioning features or use of this software
23afad76eobrien *    must display the following acknowledgement:
24afad76eobrien *	This product includes software developed by the University of
25afad76eobrien *	California, Berkeley and its contributors.
26afad76eobrien * 4. Neither the name of the University nor the names of its contributors
27afad76eobrien *    may be used to endorse or promote products derived from this software
28afad76eobrien *    without specific prior written permission.
29afad76eobrien *
30afad76eobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
31afad76eobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32afad76eobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33afad76eobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34afad76eobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35afad76eobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36afad76eobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37afad76eobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38afad76eobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39afad76eobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40afad76eobrien * SUCH DAMAGE.
41afad76eobrien *
42afad76eobrien *	from: @(#)sprite.h	8.1 (Berkeley) 6/6/93
439da7bddpfg * $FreeBSD$
44afad76eobrien */
45afad76eobrien
46afad76eobrien/*
47afad76eobrien * sprite.h --
48afad76eobrien *
49afad76eobrien * Common constants and type declarations for Sprite.
50afad76eobrien */
51afad76eobrien
52afad76eobrien#ifndef _SPRITE
53afad76eobrien#define _SPRITE
54afad76eobrien
55afad76eobrien
56afad76eobrien/*
57afad76eobrien * A boolean type is defined as an integer, not an enum. This allows a
58afad76eobrien * boolean argument to be an expression that isn't strictly 0 or 1 valued.
59afad76eobrien */
60afad76eobrien
61afad76eobrientypedef int Boolean;
62afad76eobrien#ifndef TRUE
63afad76eobrien#define TRUE	1
64afad76eobrien#endif /* TRUE */
65afad76eobrien#ifndef FALSE
66afad76eobrien#define FALSE	0
67afad76eobrien#endif /* FALSE */
68afad76eobrien
69afad76eobrien/*
70afad76eobrien * Functions that must return a status can return a ReturnStatus to
71afad76eobrien * indicate success or type of failure.
72afad76eobrien */
73afad76eobrien
74afad76eobrientypedef int  ReturnStatus;
75afad76eobrien
76afad76eobrien/*
77afad76eobrien * The following statuses overlap with the first 2 generic statuses
78afad76eobrien * defined in status.h:
79afad76eobrien *
80afad76eobrien * SUCCESS			There was no error.
81afad76eobrien * FAILURE			There was a general error.
82afad76eobrien */
83afad76eobrien
84afad76eobrien#define	SUCCESS			0x00000000
85afad76eobrien#define	FAILURE			0x00000001
86afad76eobrien
87afad76eobrien
88afad76eobrien/*
89afad76eobrien * A nil pointer must be something that will cause an exception if
90afad76eobrien * referenced.  There are two nils: the kernels nil and the nil used
91afad76eobrien * by user processes.
92afad76eobrien */
93afad76eobrien
94afad76eobrien#define NIL 		~0
95afad76eobrien#define USER_NIL 	0
96afad76eobrien#ifndef NULL
97afad76eobrien#define NULL	 	0
98afad76eobrien#endif /* NULL */
99afad76eobrien
100afad76eobrien/*
101afad76eobrien * An address is just a pointer in C.  It is defined as a character pointer
102afad76eobrien * so that address arithmetic will work properly, a byte at a time.
103afad76eobrien */
104afad76eobrien
105afad76eobrientypedef char *Address;
106afad76eobrien
107afad76eobrien/*
108afad76eobrien * ClientData is an uninterpreted word.  It is defined as an int so that
109afad76eobrien * kdbx will not interpret client data as a string.  Unlike an "Address",
110afad76eobrien * client data will generally not be used in arithmetic.
111afad76eobrien * But we don't have kdbx anymore so we define it as void (christos)
112afad76eobrien */
113afad76eobrien
114afad76eobrientypedef void *ClientData;
115afad76eobrien
116afad76eobrien#endif /* _SPRITE */
117