amend previous commit, remove cruft, no more extern function pointers

This commit is contained in:
Robin Gareus
2014-04-11 19:36:17 +02:00
parent e359521fad
commit f678700376
6 changed files with 4 additions and 48 deletions

View File

@@ -363,7 +363,6 @@ def build(bld):
# here using winegcc, and link it to the GTK front-end library
obj = bld (features = 'cxx c cxxprogram wine')
obj.source = (
'../libs/fst/fst.c',
'../libs/fst/vstwin.c',
'../vst/winmain.c',
)

View File

@@ -376,7 +376,7 @@ def build(bld):
obj.includes += [ '../fst' ]
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
if bld.env['build_target'] == 'mingw':
obj.source += [ '../fst/vstwin.c', '../fst/fst.c']
obj.source += [ '../fst/vstwin.c']
obj.uselib += ['GDI32']
if bld.is_defined('LXVST_SUPPORT'):

View File

@@ -1,24 +0,0 @@
#include <stdio.h>
#include <stdarg.h>
#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;

View File

@@ -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

View File

@@ -2,6 +2,8 @@
#include <string.h>
#include <windows.h>
#define fst_error(...) fprintf(stderr, __VA_ARGS__)
#ifdef PLATFORM_WINDOWS
#include <pthread.h>

View File

@@ -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' )