- or download this
int printf_handler(const char *format, va_list args)
{
...
sv_vsetpvf(printf_str, format, &args);
...
- or download this
int printf_handler(const char *format, va_list* args)
{
...
sv_vsetpvf(printf_str, format, args);
...
- or download this
#include <stdarg.h>
#include <stdio.h>
...
vatest("%s: %s,%s", argv[0], msg1, msg2); // three args
return 0;
}
- or download this
$ gcc -Wall vatest.c -o vatest
vatest.c: In function `vatest_':
...
Segmentation fault
$ file vatest
vatest: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for G
+NU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux
+2.6.4, not stripped
- or download this
...
void vatest_(char* format, va_list* args) {
...
va_end (args);
}
...
- or download this
$ gcc -Wall vatest.c -o vatest
$ ./vatest
./vatest: foo: Success
./vatest: foo,bar: Success