1 #ifndef INTERNALLOADSEG_H
2 #define INTERNALLOADSEG_H
4 BPTR
InternalLoadSeg_AOS(BPTR file
,
8 struct DosLibrary
* DOSBase
);
10 BPTR
InternalLoadSeg_ELF(BPTR file
,
14 struct DosLibrary
* DOSBase
);
16 int read_block(BPTR file
, APTR buffer
, ULONG size
, SIPTR
* funcarray
, struct DosLibrary
* DOSBase
);
18 /* AllocVec() simulation using allocation function from the supplied array */
19 APTR
_ilsAllocVec(SIPTR
*funcarray
, ULONG size
, ULONG flags
);
20 void _ilsFreeVec(SIPTR
*funcarray
, void *buf
);
22 #define ilsAllocVec(size, flags) _ilsAllocVec(funcarray, size, flags)
23 #define ilsFreeVec(ptr) _ilsFreeVec(funcarray, ptr)
25 #define ilsRead(file, buf, size) \
28 LONG, (APTR)(funcarray[0]), \
29 AROS_UFCA(BPTR, file, D1), \
30 AROS_UFCA(void *, buf, D2), \
31 AROS_UFCA(LONG, size, D3), \
32 AROS_UFCA(struct DosLibrary *, DOSBase, A6) \
35 #define ilsAllocMem(size, flags) \
38 void *, (APTR)(funcarray[1]),\
39 AROS_UFCA(ULONG, size, D0), \
40 AROS_UFCA(ULONG, flags, D1), \
41 AROS_UFCA(struct ExecBase *, SysBase, A6) \
44 #define ilsFreeMem(addr, size) \
47 void, (APTR)(funcarray[2]), \
48 AROS_UFCA(void *, addr, A1), \
49 AROS_UFCA(ULONG, size, D0), \
50 AROS_UFCA(struct ExecBase *, SysBase, A6) \
53 #define ilsSeek(file, pos, mode) \
56 LONG, (APTR)(funcarray[3]), \
57 AROS_UFCA(BPTR, file, D1), \
58 AROS_UFCA(LONG, pos, D2), \
59 AROS_UFCA(LONG, mode, D3), \
60 AROS_UFCA(struct DosLibrary *, DOSBase, A6) \