added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / ppc-all / common / include / inline / macros.h
blob262b73fdb744c384f8323a9f7761c1ac816bc02f
1 #ifndef INLINE_MACROS_H
2 #define INLINE_MACROS_H
4 /*
5 Copyright C 2003, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Inline macros for function calls
9 Lang: English
12 #ifndef EXEC_TYPES_H
13 #include <exec/types.h>
14 #endif
15 #ifndef AROS_ABI_H
16 #include <aros/abi.h>
17 #endif
20 These are general inlines used to call library's functions. Macros are
21 defined as follows:
23 LPx - function that take X arguments.
25 Modifiers (variations possible):
26 NR - no return (void).
27 A4, A5 - "a4" or "a5" is used as one of the arguments.
28 UB - base will be given explicitly by user.
29 FP - one of the parameters has type "pointer to function"
32 #define LP0(offs, rt, name, bt, bn) \
33 ({ \
34 rt _##name##_re; \
35 { \
36 (bt)__A6 = (bn); \
37 _##name##_re = ((rt (*)())__AROS_GETJUMPVEC(__A6,(offs)/6))(); \
38 (rt)__D0 = _##name##_re; \
39 } \
40 _##name##_re; \
43 #define LP0NR(offs, name, bt, bn) \
44 ({ \
45 { \
46 (bt)__A6 = (bn); \
47 ((rt (*)())__AROS_GETJUMPVEC(__A6,(offs)/6))(); \
48 } \
53 #endif /* INLINE_MACROS_H */