Code cleanup
This commit is contained in:
23
src/common.c
23
src/common.c
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user