xref: /freebsd/sbin/rcorder/sprite.h (revision 51e16cb8fc536913f490ac6bc9c17e92ebd0411b)
19d62501fSDavid E. O'Brien /*	$NetBSD: sprite.h,v 1.1 1999/11/23 05:28:22 mrg Exp $	*/
29d62501fSDavid E. O'Brien 
3*df57947fSPedro F. Giffuni /*-
4*df57947fSPedro F. Giffuni  * SPDX-License-Identifier: BSD-4-Clause
5*df57947fSPedro F. Giffuni  *
69d62501fSDavid E. O'Brien  * Copyright (c) 1988, 1989, 1990, 1993
79d62501fSDavid E. O'Brien  *	The Regents of the University of California.  All rights reserved.
89d62501fSDavid E. O'Brien  * Copyright (c) 1989 by Berkeley Softworks
99d62501fSDavid E. O'Brien  * All rights reserved.
109d62501fSDavid E. O'Brien  *
119d62501fSDavid E. O'Brien  * This code is derived from software contributed to Berkeley by
129d62501fSDavid E. O'Brien  * Adam de Boor.
139d62501fSDavid E. O'Brien  *
149d62501fSDavid E. O'Brien  * Redistribution and use in source and binary forms, with or without
159d62501fSDavid E. O'Brien  * modification, are permitted provided that the following conditions
169d62501fSDavid E. O'Brien  * are met:
179d62501fSDavid E. O'Brien  * 1. Redistributions of source code must retain the above copyright
189d62501fSDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer.
199d62501fSDavid E. O'Brien  * 2. Redistributions in binary form must reproduce the above copyright
209d62501fSDavid E. O'Brien  *    notice, this list of conditions and the following disclaimer in the
219d62501fSDavid E. O'Brien  *    documentation and/or other materials provided with the distribution.
229d62501fSDavid E. O'Brien  * 3. All advertising materials mentioning features or use of this software
239d62501fSDavid E. O'Brien  *    must display the following acknowledgement:
249d62501fSDavid E. O'Brien  *	This product includes software developed by the University of
259d62501fSDavid E. O'Brien  *	California, Berkeley and its contributors.
269d62501fSDavid E. O'Brien  * 4. Neither the name of the University nor the names of its contributors
279d62501fSDavid E. O'Brien  *    may be used to endorse or promote products derived from this software
289d62501fSDavid E. O'Brien  *    without specific prior written permission.
299d62501fSDavid E. O'Brien  *
309d62501fSDavid E. O'Brien  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
319d62501fSDavid E. O'Brien  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
329d62501fSDavid E. O'Brien  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
339d62501fSDavid E. O'Brien  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
349d62501fSDavid E. O'Brien  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
359d62501fSDavid E. O'Brien  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
369d62501fSDavid E. O'Brien  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
379d62501fSDavid E. O'Brien  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
389d62501fSDavid E. O'Brien  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
399d62501fSDavid E. O'Brien  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
409d62501fSDavid E. O'Brien  * SUCH DAMAGE.
419d62501fSDavid E. O'Brien  */
429d62501fSDavid E. O'Brien 
439d62501fSDavid E. O'Brien /*
449d62501fSDavid E. O'Brien  * sprite.h --
459d62501fSDavid E. O'Brien  *
469d62501fSDavid E. O'Brien  * Common constants and type declarations for Sprite.
479d62501fSDavid E. O'Brien  */
489d62501fSDavid E. O'Brien 
499d62501fSDavid E. O'Brien #ifndef _SPRITE
509d62501fSDavid E. O'Brien #define _SPRITE
519d62501fSDavid E. O'Brien 
529d62501fSDavid E. O'Brien 
539d62501fSDavid E. O'Brien /*
549d62501fSDavid E. O'Brien  * A boolean type is defined as an integer, not an enum. This allows a
559d62501fSDavid E. O'Brien  * boolean argument to be an expression that isn't strictly 0 or 1 valued.
569d62501fSDavid E. O'Brien  */
579d62501fSDavid E. O'Brien 
589d62501fSDavid E. O'Brien typedef int Boolean;
599d62501fSDavid E. O'Brien #ifndef TRUE
609d62501fSDavid E. O'Brien #define TRUE	1
619d62501fSDavid E. O'Brien #endif /* TRUE */
629d62501fSDavid E. O'Brien #ifndef FALSE
639d62501fSDavid E. O'Brien #define FALSE	0
649d62501fSDavid E. O'Brien #endif /* FALSE */
659d62501fSDavid E. O'Brien 
669d62501fSDavid E. O'Brien /*
679d62501fSDavid E. O'Brien  * Functions that must return a status can return a ReturnStatus to
689d62501fSDavid E. O'Brien  * indicate success or type of failure.
699d62501fSDavid E. O'Brien  */
709d62501fSDavid E. O'Brien 
719d62501fSDavid E. O'Brien typedef int  ReturnStatus;
729d62501fSDavid E. O'Brien 
739d62501fSDavid E. O'Brien /*
749d62501fSDavid E. O'Brien  * The following statuses overlap with the first 2 generic statuses
759d62501fSDavid E. O'Brien  * defined in status.h:
769d62501fSDavid E. O'Brien  *
779d62501fSDavid E. O'Brien  * SUCCESS			There was no error.
789d62501fSDavid E. O'Brien  * FAILURE			There was a general error.
799d62501fSDavid E. O'Brien  */
809d62501fSDavid E. O'Brien 
819d62501fSDavid E. O'Brien #define	SUCCESS			0x00000000
829d62501fSDavid E. O'Brien #define	FAILURE			0x00000001
839d62501fSDavid E. O'Brien 
849d62501fSDavid E. O'Brien 
859d62501fSDavid E. O'Brien /*
869d62501fSDavid E. O'Brien  * A nil pointer must be something that will cause an exception if
879d62501fSDavid E. O'Brien  * referenced.  There are two nils: the kernels nil and the nil used
889d62501fSDavid E. O'Brien  * by user processes.
899d62501fSDavid E. O'Brien  */
909d62501fSDavid E. O'Brien 
919d62501fSDavid E. O'Brien #define NIL 		~0
929d62501fSDavid E. O'Brien #define USER_NIL 	0
939d62501fSDavid E. O'Brien #ifndef NULL
949d62501fSDavid E. O'Brien #define NULL	 	0
959d62501fSDavid E. O'Brien #endif /* NULL */
969d62501fSDavid E. O'Brien 
979d62501fSDavid E. O'Brien /*
989d62501fSDavid E. O'Brien  * An address is just a pointer in C.  It is defined as a character pointer
999d62501fSDavid E. O'Brien  * so that address arithmetic will work properly, a byte at a time.
1009d62501fSDavid E. O'Brien  */
1019d62501fSDavid E. O'Brien 
1029d62501fSDavid E. O'Brien typedef char *Address;
1039d62501fSDavid E. O'Brien 
1049d62501fSDavid E. O'Brien /*
1059d62501fSDavid E. O'Brien  * ClientData is an uninterpreted word.  It is defined as an int so that
1069d62501fSDavid E. O'Brien  * kdbx will not interpret client data as a string.  Unlike an "Address",
1079d62501fSDavid E. O'Brien  * client data will generally not be used in arithmetic.
1089d62501fSDavid E. O'Brien  * But we don't have kdbx anymore so we define it as void (christos)
1099d62501fSDavid E. O'Brien  */
1109d62501fSDavid E. O'Brien 
1119d62501fSDavid E. O'Brien typedef void *ClientData;
1129d62501fSDavid E. O'Brien 
1139d62501fSDavid E. O'Brien #endif /* _SPRITE */
114