178344Sobrien/*	$NetBSD: sprite.h,v 1.1 1999/11/23 05:28:22 mrg Exp $	*/
278344Sobrien
378344Sobrien/*
478344Sobrien * Copyright (c) 1988, 1989, 1990, 1993
578344Sobrien *	The Regents of the University of California.  All rights reserved.
678344Sobrien * Copyright (c) 1989 by Berkeley Softworks
778344Sobrien * All rights reserved.
878344Sobrien *
978344Sobrien * This code is derived from software contributed to Berkeley by
1078344Sobrien * Adam de Boor.
1178344Sobrien *
1278344Sobrien * Redistribution and use in source and binary forms, with or without
1378344Sobrien * modification, are permitted provided that the following conditions
1478344Sobrien * are met:
1578344Sobrien * 1. Redistributions of source code must retain the above copyright
1678344Sobrien *    notice, this list of conditions and the following disclaimer.
1778344Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1878344Sobrien *    notice, this list of conditions and the following disclaimer in the
1978344Sobrien *    documentation and/or other materials provided with the distribution.
2078344Sobrien * 3. All advertising materials mentioning features or use of this software
2178344Sobrien *    must display the following acknowledgement:
2278344Sobrien *	This product includes software developed by the University of
2378344Sobrien *	California, Berkeley and its contributors.
2478344Sobrien * 4. Neither the name of the University nor the names of its contributors
2578344Sobrien *    may be used to endorse or promote products derived from this software
2678344Sobrien *    without specific prior written permission.
2778344Sobrien *
2878344Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2978344Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3078344Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3178344Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3278344Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3378344Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3478344Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3578344Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3678344Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3778344Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3878344Sobrien * SUCH DAMAGE.
3978344Sobrien *
4078344Sobrien *	from: @(#)sprite.h	8.1 (Berkeley) 6/6/93
4178344Sobrien */
4278344Sobrien
4378344Sobrien/*
4478344Sobrien * sprite.h --
4578344Sobrien *
4678344Sobrien * Common constants and type declarations for Sprite.
4778344Sobrien */
4878344Sobrien
4978344Sobrien#ifndef _SPRITE
5078344Sobrien#define _SPRITE
5178344Sobrien
5278344Sobrien
5378344Sobrien/*
5478344Sobrien * A boolean type is defined as an integer, not an enum. This allows a
5578344Sobrien * boolean argument to be an expression that isn't strictly 0 or 1 valued.
5678344Sobrien */
5778344Sobrien
5878344Sobrientypedef int Boolean;
5978344Sobrien#ifndef TRUE
6078344Sobrien#define TRUE	1
6178344Sobrien#endif /* TRUE */
6278344Sobrien#ifndef FALSE
6378344Sobrien#define FALSE	0
6478344Sobrien#endif /* FALSE */
6578344Sobrien
6678344Sobrien/*
6778344Sobrien * Functions that must return a status can return a ReturnStatus to
6878344Sobrien * indicate success or type of failure.
6978344Sobrien */
7078344Sobrien
7178344Sobrientypedef int  ReturnStatus;
7278344Sobrien
7378344Sobrien/*
7478344Sobrien * The following statuses overlap with the first 2 generic statuses
7578344Sobrien * defined in status.h:
7678344Sobrien *
7778344Sobrien * SUCCESS			There was no error.
7878344Sobrien * FAILURE			There was a general error.
7978344Sobrien */
8078344Sobrien
8178344Sobrien#define	SUCCESS			0x00000000
8278344Sobrien#define	FAILURE			0x00000001
8378344Sobrien
8478344Sobrien
8578344Sobrien/*
8678344Sobrien * A nil pointer must be something that will cause an exception if
8778344Sobrien * referenced.  There are two nils: the kernels nil and the nil used
8878344Sobrien * by user processes.
8978344Sobrien */
9078344Sobrien
9178344Sobrien#define NIL 		~0
9278344Sobrien#define USER_NIL 	0
9378344Sobrien#ifndef NULL
9478344Sobrien#define NULL	 	0
9578344Sobrien#endif /* NULL */
9678344Sobrien
9778344Sobrien/*
9878344Sobrien * An address is just a pointer in C.  It is defined as a character pointer
9978344Sobrien * so that address arithmetic will work properly, a byte at a time.
10078344Sobrien */
10178344Sobrien
10278344Sobrientypedef char *Address;
10378344Sobrien
10478344Sobrien/*
10578344Sobrien * ClientData is an uninterpreted word.  It is defined as an int so that
10678344Sobrien * kdbx will not interpret client data as a string.  Unlike an "Address",
10778344Sobrien * client data will generally not be used in arithmetic.
10878344Sobrien * But we don't have kdbx anymore so we define it as void (christos)
10978344Sobrien */
11078344Sobrien
11178344Sobrientypedef void *ClientData;
11278344Sobrien
11378344Sobrien#endif /* _SPRITE */
114