Help for this page

Select Code to Download


  1. or download this
    int printf_handler(const char *format, va_list args)
    {
        ...
        sv_vsetpvf(printf_str, format, &args);
        ...
    
  2. or download this
    int printf_handler(const char *format, va_list* args)
    {
        ...
        sv_vsetpvf(printf_str, format, args);
        ...
    
  3. or download this
    #include <stdarg.h>
    #include <stdio.h>
    ...
        vatest("%s: %s,%s", argv[0], msg1, msg2);  // three args
        return 0;
    }
    
  4. 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
    
  5. or download this
    ...
    void vatest_(char* format, va_list* args) {
    ...
        va_end (args);
    }
    ...
    
  6. or download this
    $ gcc -Wall vatest.c -o vatest
    $ ./vatest
    ./vatest: foo: Success
    ./vatest: foo,bar: Success