From f67870037681867e36e8e97b991e731d35976089 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 11 Apr 2014 19:36:17 +0200 Subject: amend previous commit, remove cruft, no more extern function pointers --- libs/fst/fst.c | 24 ------------------------ libs/fst/fst.h | 20 -------------------- libs/fst/vstwin.c | 2 ++ libs/fst/wscript | 3 +-- 4 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 libs/fst/fst.c (limited to 'libs/fst') diff --git a/libs/fst/fst.c b/libs/fst/fst.c deleted file mode 100644 index 3ceee5278f..0000000000 --- a/libs/fst/fst.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include - -#include "fst.h" - -void -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); -} - -static void -default_fst_error_callback (const char *desc) -{ - fprintf(stderr, "%s\n", desc); -} - -void (*fst_error_callback)(const char *desc) = &default_fst_error_callback; diff --git a/libs/fst/fst.h b/libs/fst/fst.h index e9a92e6224..7b9a67125e 100644 --- a/libs/fst/fst.h +++ b/libs/fst/fst.h @@ -9,26 +9,6 @@ #include "ardour/vst_types.h" #include "ardour/vestige/aeffectx.h" -/** - * Display FST error message. - * - * Set via fst_set_error_function(), otherwise a FST-provided - * default will print @a msg (plus a newline) to stderr. - * - * @param msg error message text (no newline at end). - */ -LIBARDOUR_API void (*fst_error_callback)(const char *msg); - -/** - * Set the @ref fst_error_callback for error message display. - * - * The FST library provides two built-in callbacks for this purpose: - * default_fst_error_callback() and silent_fst_error_callback(). - */ -void fst_set_error_function (void (*func)(const char *)); - -void fst_error (const char *fmt, ...); - #ifdef __cplusplus extern "C" { #endif diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 4c4e2888f5..c07aaa09dc 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -2,6 +2,8 @@ #include #include +#define fst_error(...) fprintf(stderr, __VA_ARGS__) + #ifdef PLATFORM_WINDOWS #include diff --git a/libs/fst/wscript b/libs/fst/wscript index 8faefe3281..809f13840b 100644 --- a/libs/fst/wscript +++ b/libs/fst/wscript @@ -59,7 +59,6 @@ def build(bld): obj = bld (features = 'c cxx cxxprogram wine') obj.source = ( 'scanner.cc', - 'fst.c', 'vstwin.c', ) obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] @@ -69,7 +68,7 @@ def build(bld): else: obj = bld (features = 'cxx c cxxprogram') if bld.is_defined('WINDOWS_VST_SUPPORT'): - obj.source = ( 'scanner.cc', 'fst.c', 'vstwin.c' ) + obj.source = ( 'scanner.cc', 'vstwin.c' ) obj.uselib = ['GIOMM', 'DL', 'GDI32'] else: obj.source = ( 'scanner.cc' ) -- cgit v1.2.3