Make alternative sigcontextpath a little more generic.
[AROS.git] / compiler / include / clib / arossupport_protos.h
blobedd1578caf675e788af9d930a279ff37213d3c1a
1 #ifndef CLIB_AROSSUPPORT_PROTOS_H
2 #define CLIB_AROSSUPPORT_PROTOS_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Prototypes for aros.lib
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
15 #ifndef AROS_AROSSUPPORTBASE_H
16 # include <aros/arossupportbase.h>
17 #endif
18 #ifndef EXEC_EXECBASE_H
19 # include <exec/execbase.h>
20 #endif
21 #ifndef DOS_DOS_H
22 # include <dos/dos.h>
23 #endif
24 #ifndef UTILITY_HOOKS_H
25 # include <utility/hooks.h>
26 #endif
28 #ifndef PROTO_EXEC_H
29 # include <proto/exec.h>
30 #endif
32 #ifdef DEBUG_FreeMem
33 # if DEBUG_FreeMem
34 # undef FreeMem
35 # define FreeMem NastyFreeMem
36 # endif
37 #endif
39 /* for va_list in kprintf() proto */
40 #include <stdarg.h>
43 Prototypes
45 __BEGIN_DECLS
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, ULONG size);
52 APTR RemoveSList (APTR * list, APTR node);
53 void hexdump (const void * data, IPTR offset, ULONG count);
54 int strrncasecmp (const char *, const char *, int);
55 void RawPutChars (const UBYTE * string, int len);
56 BOOL IsDosEntryA (char *Name, ULONG Flags);
58 /* dos.library-compatible data generation */
59 BSTR CreateBSTR(CONST_STRPTR src);
60 BPTR CreateSegList(APTR function);
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);
95 __END_DECLS
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)
102 #endif
104 #endif /* CLIB_AROSSUPPORT_PROTOS_H */