1 #ifndef CLIB_AROSSUPPORT_PROTOS_H
2 #define CLIB_AROSSUPPORT_PROTOS_H
5 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
8 Desc: Prototypes for aros.lib
13 # include <exec/types.h>
15 #ifndef AROS_AROSSUPPORTBASE_H
16 # include <aros/arossupportbase.h>
18 #ifndef EXEC_EXECBASE_H
19 # include <exec/execbase.h>
24 #ifndef UTILITY_HOOKS_H
25 # include <utility/hooks.h>
29 # include <proto/exec.h>
35 # define FreeMem NastyFreeMem
39 /* for va_list in kprintf() proto */
47 ULONG
CalcChecksum (APTR mem
, ULONG size
);
48 int kprintf (const char * fmt
, ...);
49 int vkprintf (const char * fmt
, va_list ap
);
50 int rkprintf (const STRPTR
, const STRPTR
, int, const UBYTE
* fmt
, ...);
51 void NastyFreeMem (APTR mem
, IPTR size
);
52 APTR
RemoveSList (APTR
* list
, APTR node
);
53 void hexdump (const void * data
, IPTR offset
, ULONG count
);
54 void RawPutChars (const UBYTE
* string
, int len
);
55 BOOL
IsDosEntryA (char *Name
, ULONG Flags
);
57 /* dos.library-compatible data generation */
58 BSTR
CreateBSTR(CONST_STRPTR src
);
59 BPTR
__CreateSegList(APTR function
, struct ExecBase
*sysBase
);
60 #define CreateSegList(func) __CreateSegList(func, SysBase)
63 * Taglist parsing functions.
64 * These functions are intended for use by early startup code only
65 * (where utility.library is not available yet).
66 * Please consider using utility.library whenever possible.
68 struct TagItem
*LibNextTagItem(struct TagItem
**tagListPtr
);
69 struct TagItem
*LibFindTagItem(Tag tagValue
, const struct TagItem
*tagList
);
70 IPTR
LibGetTagData(Tag tagValue
, IPTR defaultVal
, const struct TagItem
*tagList
);
72 /* AROS enhancements */
73 BOOL
ReadByte (struct Hook
*, UBYTE
* dataptr
, void * stream
);
74 BOOL
ReadWord (struct Hook
*, UWORD
* dataptr
, void * stream
);
75 BOOL
ReadLong (struct Hook
*, ULONG
* dataptr
, void * stream
);
76 BOOL
ReadFloat (struct Hook
*, FLOAT
* dataptr
, void * stream
);
77 BOOL
ReadDouble (struct Hook
*, DOUBLE
* dataptr
, void * stream
);
78 BOOL
ReadString (struct Hook
*, STRPTR
* dataptr
, void * stream
);
79 BOOL
ReadStruct (struct Hook
*, APTR
* dataptr
, void * stream
, const IPTR
* desc
);
80 BOOL
WriteByte (struct Hook
*, UBYTE data
, void * stream
);
81 BOOL
WriteWord (struct Hook
*, UWORD data
, void * stream
);
82 BOOL
WriteLong (struct Hook
*, ULONG data
, void * stream
);
83 BOOL
WriteFloat (struct Hook
*, FLOAT data
, void * stream
);
84 BOOL
WriteDouble (struct Hook
*, DOUBLE data
, void * stream
);
85 BOOL
WriteString (struct Hook
*, STRPTR data
, void * stream
);
86 BOOL
WriteStruct (struct Hook
*, APTR data
, void * stream
, const IPTR
* desc
);
87 void FreeStruct (APTR s
, const IPTR
* desc
);
89 /* RastPort manipulations */
90 struct RastPort
*CreateRastPort(void);
91 struct RastPort
*CloneRastPort(struct RastPort
*rp
);
92 void DeinitRastPort(struct RastPort
*rp
);
93 void FreeRastPort(struct RastPort
*rp
);
97 /* don't use SysBase->kprintf on AmigaOS, or AROS m68k */
98 #if defined(__AROS__) && !defined(__mc68000)
99 # define kprintf (((struct AROSSupportBase *)(SysBase->DebugAROSBase))->kprintf)
100 # define rkprintf (((struct AROSSupportBase *)(SysBase->DebugAROSBase))->rkprintf)
101 # define vkprintf (((struct AROSSupportBase *)(SysBase->DebugAROSBase))->vkprintf)
104 #endif /* CLIB_AROSSUPPORT_PROTOS_H */