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