1 /* 2 * Copyright (c) 1988, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1989 by Berkeley Softworks 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Adam de Boor. 9 * 10 * %sccs.include.redist.c% 11 * 12 * @(#)sprite.h 8.2 (Berkeley) 04/28/95 13 */ 14 15 /* 16 * sprite.h -- 17 * 18 * Common constants and type declarations for Sprite. 19 */ 20 21 #ifndef _SPRITE 22 #define _SPRITE 23 24 25 /* 26 * A boolean type is defined as an integer, not an enum. This allows a 27 * boolean argument to be an expression that isn't strictly 0 or 1 valued. 28 */ 29 30 typedef int Boolean; 31 #ifndef TRUE 32 #define TRUE 1 33 #endif TRUE 34 #ifndef FALSE 35 #define FALSE 0 36 #endif FALSE 37 38 /* 39 * Functions that must return a status can return a ReturnStatus to 40 * indicate success or type of failure. 41 */ 42 43 typedef int ReturnStatus; 44 45 /* 46 * The following statuses overlap with the first 2 generic statuses 47 * defined in status.h: 48 * 49 * SUCCESS There was no error. 50 * FAILURE There was a general error. 51 */ 52 53 #define SUCCESS 0x00000000 54 #define FAILURE 0x00000001 55 56 57 /* 58 * A nil pointer must be something that will cause an exception if 59 * referenced. There are two nils: the kernels nil and the nil used 60 * by user processes. 61 */ 62 63 #define NIL ~0 64 #define USER_NIL 0 65 #ifndef NULL 66 #define NULL 0 67 #endif NULL 68 69 /* 70 * An address is just a pointer in C. It is defined as a character pointer 71 * so that address arithmetic will work properly, a byte at a time. 72 */ 73 74 typedef char *Address; 75 76 /* 77 * ClientData is an uninterpreted word. It is defined as an int so that 78 * kdbx will not interpret client data as a string. Unlike an "Address", 79 * client data will generally not be used in arithmetic. 80 * But we don't have kdbx anymore so we define it as void (christos) 81 */ 82 83 typedef void *ClientData; 84 85 #endif /* _SPRITE */ 86