Commit | Line | Data |
---|---|---|
fe902645 | 1 | /* |
b0ff1758 KB |
2 | * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. |
3 | * Copyright (c) 1988, 1989 by Adam de Boor | |
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 | * |
b0ff1758 KB |
10 | * Redistribution and use in source and binary forms are permitted |
11 | * provided that the above copyright notice and this paragraph are | |
12 | * duplicated in all such forms and that any documentation, | |
13 | * advertising materials, and other materials related to such | |
14 | * distribution and use acknowledge that the software was developed | |
15 | * by the University of California, Berkeley. The name of the | |
16 | * University may not be used to endorse or promote products derived | |
17 | * from this software without specific prior written permission. | |
18 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
19 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
fe902645 | 21 | * |
b0ff1758 KB |
22 | * @(#)sprite.h 5.2 (Berkeley) %G% |
23 | */ | |
24 | ||
25 | /* | |
26 | * sprite.h -- | |
fe902645 | 27 | * |
b0ff1758 | 28 | * Common constants and type declarations for Sprite. |
fe902645 KB |
29 | */ |
30 | ||
31 | #ifndef _SPRITE | |
32 | #define _SPRITE | |
33 | ||
34 | ||
35 | /* | |
36 | * A boolean type is defined as an integer, not an enum. This allows a | |
37 | * boolean argument to be an expression that isn't strictly 0 or 1 valued. | |
38 | */ | |
39 | ||
40 | typedef int Boolean; | |
41 | #ifndef TRUE | |
42 | #define TRUE 1 | |
43 | #endif TRUE | |
44 | #ifndef FALSE | |
45 | #define FALSE 0 | |
46 | #endif FALSE | |
47 | ||
48 | /* | |
49 | * Functions that must return a status can return a ReturnStatus to | |
50 | * indicate success or type of failure. | |
51 | */ | |
52 | ||
53 | typedef int ReturnStatus; | |
54 | ||
55 | /* | |
56 | * The following statuses overlap with the first 2 generic statuses | |
57 | * defined in status.h: | |
58 | * | |
59 | * SUCCESS There was no error. | |
60 | * FAILURE There was a general error. | |
61 | */ | |
62 | ||
63 | #define SUCCESS 0x00000000 | |
64 | #define FAILURE 0x00000001 | |
65 | ||
66 | ||
67 | /* | |
68 | * A nil pointer must be something that will cause an exception if | |
69 | * referenced. There are two nils: the kernels nil and the nil used | |
70 | * by user processes. | |
71 | */ | |
72 | ||
73 | #define NIL 0xFFFFFFFF | |
74 | #define USER_NIL 0 | |
75 | #ifndef NULL | |
76 | #define NULL 0 | |
77 | #endif NULL | |
78 | ||
79 | /* | |
80 | * An address is just a pointer in C. It is defined as a character pointer | |
81 | * so that address arithmetic will work properly, a byte at a time. | |
82 | */ | |
83 | ||
84 | typedef char *Address; | |
85 | ||
86 | /* | |
87 | * ClientData is an uninterpreted word. It is defined as an int so that | |
88 | * kdbx will not interpret client data as a string. Unlike an "Address", | |
89 | * client data will generally not be used in arithmetic. | |
90 | */ | |
91 | ||
92 | typedef int *ClientData; | |
93 | ||
94 | #ifdef notdef | |
95 | #include "status.h" | |
96 | #endif | |
97 | ||
98 | #endif _SPRITE |