Thomas' second solution based on va_start is the correct one "by the letter", even though it is for most (all?) Amiga compilers equivalent to the first. I suggest to go for the clean way and work on top of va_start.
Anyhow, the typical solution here would be rather to generate compiler prototypes from the .fd file through FD2Pragma (from aminet). This will, for example for the SAS/C compiler, result in a #pragma that automatically takes the stack pointer as second argument for the tag call, so no stub function is needed.
|