Subversion Repositories HelenOS

Rev

Rev 125 | Rev 430 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 125 Rev 181
Line 37... Line 37...
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
39
 
39
 
40
typedef struct va_list {
40
typedef struct va_list {
41
    int pos;
41
    int pos;
42
    __address *last;
42
    __u8 *last;
43
} va_list;
43
} va_list;
44
 
44
 
45
#define va_start(ap, lst)       \
45
#define va_start(ap, lst)       \
46
    (ap).pos = 0;           \
46
    (ap).pos = sizeof(lst);             \
47
    (ap).last = (__address *) &(lst)
47
    (ap).last = (__u8 *) &(lst)
48
 
48
 
49
#define va_arg(ap, type)        \
49
#define va_arg(ap, type)        \
50
    ((type) *((ap).last + ++((ap).pos)))
50
    (*((type *)((ap).last + ((ap).pos  += sizeof(type) ) - sizeof(type))))
51
 
51
 
52
#define va_end(ap)
52
#define va_end(ap)
53
 
53
 
54
 
54
 
55
#endif
55
#endif