-
Notifications
You must be signed in to change notification settings - Fork 3
/
result.h
71 lines (52 loc) · 3.35 KB
/
result.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* result.h -- generic function return values */
#ifndef BASE_RESULT_H
#define BASE_RESULT_H
typedef int result_t;
/* ----------------------------------------------------------------------- */
/* DPTLib bases */
#define result_BASE_GENERIC 0x0000
#define result_BASE_STREAM 0x0100
#define result_BASE_ATOM 0x0200
#define result_BASE_HASH 0x0300
#define result_BASE_PICKLE 0x0400
#define result_BASE_TAGDB 0x0500
#define result_BASE_FILENAMEDB 0x0600
#define result_BASE_TEST 0x0700
#define result_BASE_PACKER 0x0800
#define result_BASE_LAYOUT 0x0900
#define result_BASE_BITFIFO 0x0A00
/* Non-DPTLib bases */
#define result_BASE_MMPLAYER 0x4000
#define result_BASE_CONTAINER 0x4100
#define result_BASE_CONTAINER_HASH 0x4200
#define result_BASE_CONTAINER_QUEUE 0x4300
/* AppEngine uses 0x8000+ */
/* ----------------------------------------------------------------------- */
#define result_OK (result_BASE_GENERIC + 0) /* No error */
#define result_OOM (result_BASE_GENERIC + 1) /* Out of memory */
#define result_FILE_NOT_FOUND (result_BASE_GENERIC + 2)
#define result_BAD_ARG (result_BASE_GENERIC + 3) /* An argument was unacceptable */
#define result_BUFFER_OVERFLOW (result_BASE_GENERIC + 4)
#define result_STOP_WALK (result_BASE_GENERIC + 5) /* Used to cancel callbacks */
#define result_PARSE_ERROR (result_BASE_GENERIC + 6)
#define result_TOO_BIG (result_BASE_GENERIC + 7)
#define result_NOT_IMPLEMENTED (result_BASE_GENERIC + 8) /* Function not implemented */
#define result_NOT_FOUND (result_BASE_GENERIC + 9) /* Item not found */
#define result_EXISTS (result_BASE_GENERIC + 10) /* Item already exists */
#define result_CLASHES (result_BASE_GENERIC + 11) /* Key clashes with existing one */
#define result_NULL_ARG (result_BASE_GENERIC + 12) /* An argument was NULL */
#define result_NOT_SUPPORTED (result_BASE_GENERIC + 13) /* Not supported, e.g. no hardware */
#define result_INCOMPATIBLE (result_BASE_GENERIC + 14) /* An argument was incompatible */
#define result_FOPEN_FAILED (result_BASE_GENERIC + 15)
/* Stream result codes are in io/stream.h */
/* Atom result codes are in datastruct/atom.h */
/* Hash result codes are in datastruct/hash.h */
/* Pickle result codes are in databases/pickle.h */
/* TagDB result codes are in databases/tag-db.h */
/* FilenameDB result codes are in databases/filename-db.h */
#define result_TEST_PASSED (result_BASE_TEST + 0)
#define result_TEST_FAILED (result_BASE_TEST + 1)
/* Packer result codes are in geom/packer.h */
/* Layout result codes are in geom/layout.h */
/* ----------------------------------------------------------------------- */
#endif /* BASE_RESULT_H */