5 * ADF Library. (C) 1997-1999 Laurent Clevy
9 * structures/constants definitions
16 /* ----- VOLUME ----- */
21 SECTNUM firstBlock
; /* first block of data area (from beginning of device) */
22 ULONG totalBlocks
; /* number of blocks in data area */
23 SECTNUM rootBlock
; /* root block (from firstBlock) */
24 ULONG reservedBlocks
; /* reserved blocks */
26 char dosType
; /* FFS/OFS, DIRCACHE, INTERNATIONAL */
29 int datablockSize
; /* 488 or 512 */
30 int blockSize
; /* 512 */
36 ULONG bitmapSize
; /* in blocks */
37 SECTNUM
*bitmapBlocks
; /* bitmap blocks pointers */
38 struct bBitmapBlock
**bitmapTable
;
39 BOOL
*bitmapBlocksChg
;
40 SECTNUM lastAlloc
; /* last allocated block */
56 /* ----- DEVICES ----- */
58 #define DEVTYPE_FLOPDD 1
59 #define DEVTYPE_FLOPHD 2
60 #define DEVTYPE_HARDDISK 3
61 #define DEVTYPE_HARDFILE 4
64 int devType
; /* see below */
66 UQUAD size
; /* in bytes */
68 int nVol
; /* partitions */
69 struct Volume
** volList
;
71 ULONG cylinders
; /* geometry */
80 /* ----- FILE ----- */
83 struct Volume
*volume
;
85 struct bFileHeaderBlock
* fileHdr
;
87 struct bFileExtBlock
* currentExt
;
99 /* ----- ENTRY ---- */
110 int year
, month
, days
;
111 int hour
, mins
, secs
;
115 long header
, size
, protect
;
116 short days
, mins
, ticks
;
119 char name
[MAXNAMELEN
+1], comm
[MAXCMMTLEN
+1];
120 // char *name, *comm;
128 int year
,mon
,day
,hour
,min
,sec
;
131 /* ----- ENVIRONMENT ----- */
138 #define PR_USE_NOTFCT 6
140 #define PR_USE_PROGBAR 8
141 #define PR_RWACCESS 9
142 #define PR_USE_RWACCESS 10
145 void (*vFct
)(char*); /* verbose callback function */
146 void (*wFct
)(char*); /* warning callback function */
147 void (*eFct
)(char*); /* error callback function */
149 void (*notifyFct
)(SECTNUM
, int);
152 void (*rwhAccess
)(SECTNUM
,SECTNUM
,BOOL
);
155 void (*progressBar
)(int);
165 struct List
{ /* generic linked tree */
176 char *name
; /* if (type == 2 and (secType==2 or secType==-3)) */
188 /*000*/ ULONG type
; /* T_HEADER == 2 */
189 /*004*/ ULONG headerKey
; /* current block number */
191 /*014*/ ULONG checkSum
;
192 /*018*/ ULONG hashTable
[HT_SIZE
];
194 /*140*/ ULONG access
; /* bit0=del, 1=modif, 2=write, 3=read */
195 /*144*/ ULONG byteSize
;
196 /*148*/ UBYTE commLen
;
197 /*149*/ TEXT comment
[MAXCMMTLEN
+1];
198 UBYTE r3
[91-(MAXCMMTLEN
+1)];
202 /*1b0*/ UBYTE nameLen
;
203 /*1b1*/ TEXT name
[MAXNAMELEN
+1];
205 /*1d4*/ ULONG realEntry
;
206 /*1d8*/ ULONG nextLink
;
208 /*1f0*/ ULONG nextSameHash
;
209 /*1f4*/ ULONG parent
;
210 /*1f8*/ ULONG extension
;
211 /*1fc*/ ULONG secType
;
215 #define ENV_DECLARATION struct Env adfEnv
218 #endif /* _ADF_STR_H */
219 /*##########################################################################*/