Code cleanup

This commit is contained in:
angt
2015-11-17 07:15:59 +01:00
parent 53a55e83c4
commit a261f1a8b1
4 changed files with 42 additions and 19 deletions

View File

@@ -1,8 +1,27 @@
#include "common.h"
#include <stdio.h>
#include <stdarg.h>
void gt_not_available (const char *name)
void gt_log (const char *fmt, ...)
{
fprintf(stderr, "%s is not available on your platform!\n", name);
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
void gt_fatal (const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
exit(EXIT_FAILURE);
}
void gt_na (const char *name)
{
gt_log("%s is not available on your platform!\n", name);
}