#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#define CMD_TAM_MAX (1024)
int systemf( const char * fmt, ... )
{
va_list args;
char cmd[ CMD_TAM_MAX + 1 ];
vsnprintf( cmd, CMD_TAM_MAX + 1, fmt, args );
}
int main( void )
{
int i = 123;
char ch = 'X';
char * txt = "Ola Mundo!";
float pi = 3.1415f;
double dbl = 1234567890L;
systemf( "echo int: %d", i );
systemf( "echo char: %c", ch );
systemf( "echo char*: %s", txt );
systemf( "echo float: %f", pi );
systemf( "echo double: %f", dbl );
return 0;
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGFyZy5oPgoKI2RlZmluZSBDTURfVEFNX01BWCAgICgxMDI0KQoKaW50IHN5c3RlbWYoIGNvbnN0IGNoYXIgKiBmbXQsIC4uLiApCnsKICAgIHZhX2xpc3QgYXJnczsKICAgIGNoYXIgY21kWyBDTURfVEFNX01BWCArIDEgXTsKCiAgICB2YV9zdGFydCggYXJncywgZm10ICk7CiAgICB2c25wcmludGYoIGNtZCwgQ01EX1RBTV9NQVggKyAxLCBmbXQsIGFyZ3MgKTsKICAgIHZhX2VuZChhcmdzKTsKCiAgICByZXR1cm4gc3lzdGVtKGNtZCk7Cn0KCmludCBtYWluKCB2b2lkICkKewogICAgaW50IGkgPSAxMjM7CiAgICBjaGFyIGNoID0gJ1gnOwogICAgY2hhciAqIHR4dCA9ICJPbGEgTXVuZG8hIjsKICAgIGZsb2F0IHBpID0gMy4xNDE1ZjsKICAgIGRvdWJsZSBkYmwgPSAxMjM0NTY3ODkwTDsKCiAgICBzeXN0ZW1mKCAiZWNobyBpbnQ6ICVkIiwgaSApOwogICAgc3lzdGVtZiggImVjaG8gY2hhcjogJWMiLCBjaCApOwogICAgc3lzdGVtZiggImVjaG8gY2hhcio6ICVzIiwgdHh0ICk7CiAgICBzeXN0ZW1mKCAiZWNobyBmbG9hdDogJWYiLCBwaSApOwogICAgc3lzdGVtZiggImVjaG8gZG91YmxlOiAlZiIsIGRibCApOwoKICAgIHJldHVybiAwOwp9