You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dexed/src/trace.c

22 lines
472 B

#ifdef DEBUG
#include <stdio.h>
#include <stdarg.h>
void _trace(const char *source, const char *fmt, ...) {
char output[1024];
va_list argptr;
va_start(argptr, fmt);
vsnprintf(output, 1023, fmt, argptr);
va_end(argptr);
#ifdef FILETRACE
FILE *fp;
fp=fopen("/tmp/dexed.log", "a");
fputs(source, fp);
fputs(": ", fp);
fputs(output, fp);
fputs("\n", fp);
fclose(fp);
#else
printf("%s: %s\n",source,output);
#endif
}
#endif