From e0aca2dbf9ce1ed3db295f2c4345b231c11d6c64 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Oct 2008 20:37:36 -0700 Subject: wavpack: remove C99 initializers More power to those who can't afford newer computers capable of installing/building/running newer toolchains. --- src/inputPlugins/wavpack_plugin.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/inputPlugins') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index b6da51e5e..b112ee168 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -382,17 +382,21 @@ static int can_seek(void *id) return ((InputStreamPlus *)id)->is->seekable; } -/* FIXME: remove C99 initializers */ -static WavpackStreamReader mpd_is_reader = { - .read_bytes = read_bytes, - .get_pos = get_pos, - .set_pos_abs = set_pos_abs, - .set_pos_rel = set_pos_rel, - .push_back_byte = push_back_byte, - .get_length = get_length, - .can_seek = can_seek, - .write_bytes = NULL /* no need to write edited tags */ -}; +static WavpackStreamReader mpd_is_reader; + +static int wavpack_init(void) +{ + mpd_is_reader.read_bytes = read_bytes; + mpd_is_reader.get_pos = get_pos; + mpd_is_reader.set_pos_abs = set_pos_abs; + mpd_is_reader.set_pos_rel = set_pos_rel; + mpd_is_reader.push_back_byte = push_back_byte; + mpd_is_reader.get_length = get_length; + mpd_is_reader.can_seek = can_seek; + /* mpd_is_reader.write_bytes = NULL; no need to write edited tags */ + + return 0; +} static void initInputStreamPlus(InputStreamPlus *isp, InputStream *is) @@ -551,7 +555,7 @@ static char const *wavpackMimeTypes[] = { "audio/x-wavpack", NULL }; InputPlugin wavpackPlugin = { "wavpack", - NULL, + wavpack_init, NULL, wavpack_trydecode, wavpack_streamdecode, -- cgit v1.2.3