2 Copyright © 2010, The AROS Development Team.
9 #include <aros/debug.h>
11 #include <utility/tagitem.h>
12 #include <proto/alib.h>
14 /*****************************************************************************
17 #define NO_INLINE_STDARG /* turn off inline def */
18 #include <proto/popupmenu.h>
19 extern struct PopupMenuBase
* PopupMenuBase
;
21 struct PM_IDLst
*PM_ExLst(
45 *****************************************************************************/
47 struct PM_IDLst
*retval
= NULL
;
49 #ifdef NO_LINEAR_VARARGS
50 ULONG size
= 1; // for initial value
59 for (val
= id
; val
!= 0; val
= va_arg(ap
, ULONG
))
64 D(bug("[PM_ExLst] size %d\n", size
));
66 values
= AllocVec(size
* sizeof(ULONG
), MEMF_ANY
);
70 values
[0] = id
; // initial value
75 for (idx
= 1; idx
< size
; idx
++)
77 values
[idx
] = va_arg(ap
, ULONG
);
78 D(bug("[PM_ExLst] i %d value %d\n", idx
, values
[idx
]));
81 retval
= PM_ExLstA(values
);
88 retval
= PM_ExLstA((ULONG
*)&id
);