1 #ifndef ADF_ERR_H
2 #define ADF_ERR_H
3 
4 /*
5  * adf_err.h
6  *
7  *  $Id$
8  *
9  *  error codes
10  *
11  *  This file is part of ADFLib.
12  *
13  *  ADFLib is free software; you can redistribute it and/or modify
14  *  it under the terms of the GNU General Public License as published by
15  *  the Free Software Foundation; either version 2 of the License, or
16  *  (at your option) any later version.
17  *
18  *  ADFLib is distributed in the hope that it will be useful,
19  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  *  GNU General Public License for more details.
22  *
23  *  You should have received a copy of the GNU General Public License
24  *  along with Foobar; if not, write to the Free Software
25  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
26  *
27  */
28 
29 
30 #define hasRC(rc,c) ((rc)&(c))
31 
32 #define RC_OK				0
33 #define RC_ERROR			-1
34 
35 #define RC_MALLOC           1
36 #define RC_VOLFULL			2
37 
38 
39 #define RC_FOPEN            1<<10
40 #define RC_NULLPTR          1<<12
41 
42 /* adfRead*Block() */
43 
44 #define RC_BLOCKTYPE        1
45 #define RC_BLOCKSTYPE       1<<1
46 #define RC_BLOCKSUM         1<<2
47 #define RC_HEADERKEY		1<<3
48 #define RC_BLOCKREAD        1<<4
49 
50 /* adfWrite*Block */
51 #define RC_BLOCKWRITE       1<<4
52 
53 
54 /* adfReadBlock() */
55 #define RC_BLOCKOUTOFRANGE  1
56 #define RC_BLOCKNATREAD     1<<1
57 
58 /* adfWriteBlock() */
59 /* RC_BLOCKOUTOFRANGE */
60 #define RC_BLOCKNATWRITE    1<<1
61 #define RC_BLOCKREADONLY    1<<2
62 
63 /* adfInitDumpDevice() */
64 /* RC_FOPEN */
65 /* RC_MALLOC */
66 
67 /* adfNativeReadBlock(), adfReadDumpSector() */
68 
69 #define RC_BLOCKSHORTREAD   1
70 #define RC_BLOCKFSEEK       1<<1
71 
72 /* adfNativeWriteBlock(), adfWriteDumpSector() */
73 
74 #define RC_BLOCKSHORTWRITE  1
75 /* RC_BLOCKFSEEK */
76 
77 
78 /*-- adfReadRDSKblock --*/
79 #define RC_BLOCKID          1<<5
80 
81 /*-- adfWriteRDSKblock() --*/
82 /*RC_BLOCKREADONLY*/
83 
84 #endif /* ADF_ERR_H */
85 
86 /*############################################################################*/
87