goat3d

view src/log.cc @ 45:8da36540e2e9

fixed memory leak in readxml and reversed error return
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 08 Dec 2013 02:27:32 +0200
parents cb6c1a945a11
children 498ca7ac7047
line source
1 #include <stdio.h>
2 #include <stdarg.h>
3 #include "log.h"
5 int goat_log_level = 256;
7 void logmsg(int prio, const char *fmt, ...)
8 {
9 va_list ap;
11 if(goat_log_level < prio) {
12 return;
13 }
15 fprintf(stderr, "goat3d: ");
16 va_start(ap, fmt);
17 vfprintf(stderr, fmt, ap);
18 va_end(ap);
19 }