Commit | Line | Data |
---|---|---|
fe902645 | 1 | /* |
8db0b741 KB |
2 | * Copyright (c) 1988, 1989, 1990, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
b0ff1758 KB |
4 | * Copyright (c) 1989 by Berkeley Softworks |
5 | * All rights reserved. | |
fe902645 | 6 | * |
b0ff1758 KB |
7 | * This code is derived from software contributed to Berkeley by |
8 | * Adam de Boor. | |
fe902645 | 9 | * |
87198c0c | 10 | * %sccs.include.redist.c% |
fe902645 | 11 | * |
8db0b741 | 12 | * @(#)sprite.h 8.1 (Berkeley) %G% |
b0ff1758 KB |
13 | */ |
14 | ||
15 | /* | |
16 | * sprite.h -- | |
fe902645 | 17 | * |
b0ff1758 | 18 | * Common constants and type declarations for Sprite. |
fe902645 KB |
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 | ||
553612df | 63 | #define NIL (~0) |
fe902645 KB |
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 | */ | |
81 | ||
82 | typedef int *ClientData; | |
83 | ||
84 | #ifdef notdef | |
85 | #include "status.h" | |
86 | #endif | |
87 | ||
88 | #endif _SPRITE |