#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
/*
#define espik_debug_print (...) \
{ \
va_list __ap; \
char* __output; \
__output = malloc (sizeof(char)* (strlen (__FUNCTION__", "__FILE__", "__LINE__" : ") + strlen(...))); \
sprintf (__output, "%s: %s", __FUNCTION__", "__FILE__", "__LINE__" : ", ...); \
va_start (__ap, __output); \
vfprintf (stdout, __output, ap); \
va_end (__ap); \
free (__output); \
}
*/
#define espik_debug_print (fmt, ...) \
{ \
fprintf (stdout, "%s, %s, %i: ", __FUNCTION__, __FILE__, __LINE__); \
vfprintf (stdout, fmt, ## __VA_ARGS__); \
}
int main()
{
int a = 10;
espik_debug_print ("a : %d\n", a);
return (0);
}