Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / include / dos / bptr.h
blob90abf13a48d5689a29e5bda4727bd988ead5800e
1 #ifndef DOS_BPTR_H
2 #define DOS_BPTR_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: AROS version of BPTRs
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
17 /* Replace BPTRs by simple APTRs for some machines. On Amiga with binary
18 compatibility, this would look like this:
20 typedef ULONG BPTR;
21 #define MKBADDR(a) (((BPTR)(a))>>2)
22 #define BADDR(a) (((APTR)(a))<<2)
24 #ifndef AROS_BPTR_TYPE
25 # define AROS_FAST_BPTR
26 # define AROS_BPTR_TYPE APTR
27 # define MKBADDR(a) ((APTR)(a))
28 # define BADDR(a) (a)
29 #endif
30 #ifndef AROS_BSTR_TYPE
31 # define AROS_BSTR_TYPE STRPTR
32 #endif
34 /* Macros to transparently handle BSTRs. */
35 #ifdef AROS_FAST_BPTR
36 # define AROS_BSTR_ADDR(s) ((STRPTR)(s))
37 # define AROS_BSTR_strlen(s) (strlen (s))
38 # define AROS_BSTR_setstrlen(s,l) (((BSTR)s)[l] = 0)
39 # define AROS_BSTR_getchar(s,l) (((BSTR)s)[l])
40 # define AROS_BSTR_putchar(s,l,c) (((BSTR)s)[l] = c)
41 #else
42 # define AROS_BSTR_ADDR(s) (((STRPTR)BADDR(s))+1)
43 # define AROS_BSTR_strlen(s) (AROS_BSTR_ADDR(s)[-1])
44 # define AROS_BSTR_setstrlen(s,l) (AROS_BSTR_ADDR(s)[-1] = l)
45 # define AROS_BSTR_getchar(s,l) (AROS_BSTR_ADDR(s)[l])
46 # define AROS_BSTR_putchar(s,l,c) (AROS_BSTR_ADDR(s)[l] = c)
47 #endif
49 #ifndef __typedef_BPTR
50 # define __typedef_BPTR
51 typedef AROS_BPTR_TYPE BPTR;
52 #endif
53 #ifndef __typedef_BSTR
54 # define __typedef_BSTR
55 typedef AROS_BSTR_TYPE BSTR;
56 #endif
58 #endif /* DOS_BPTR_H */