2008-06-02 17:41:35 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "fst.h"
|
|
|
|
|
2014-02-21 11:28:47 -05:00
|
|
|
void
|
2008-06-02 17:41:35 -04:00
|
|
|
fst_error (const char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
char buffer[512];
|
|
|
|
|
|
|
|
va_start (ap, fmt);
|
|
|
|
vsnprintf (buffer, sizeof(buffer), fmt, ap);
|
|
|
|
fst_error_callback (buffer);
|
|
|
|
va_end (ap);
|
|
|
|
}
|
|
|
|
|
2014-02-21 11:28:47 -05:00
|
|
|
void
|
2009-02-27 12:11:21 -05:00
|
|
|
default_fst_error_callback (const char *desc)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "%s\n", desc);
|
|
|
|
}
|
2008-06-02 17:41:35 -04:00
|
|
|
|
2009-02-27 12:11:21 -05:00
|
|
|
void (*fst_error_callback)(const char *desc) = &default_fst_error_callback;
|