changeset 1614:cf7124d464f9

wav, wav-sndfile: C99 initialisers
author William Pitcock <nenolod@atheme.org>
date Fri, 07 Sep 2007 04:15:24 -0500
parents 4eeeef9adab3
children 41286bab50dc
files src/wav/wav-sndfile.c src/wav/wav.c
diffstat 2 files changed, 22 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/src/wav/wav-sndfile.c	Fri Sep 07 04:12:39 2007 -0500
+++ b/src/wav/wav-sndfile.c	Fri Sep 07 04:15:24 2007 -0500
@@ -59,36 +59,17 @@
 static GCond *decode_cond;
 
 InputPlugin wav_ip = {
-    NULL,
-    NULL,
-    NULL,
-    plugin_init,
-    wav_about,
-    NULL,
-    is_our_file,
-    NULL,
-    play_start,
-    play_stop,
-    play_pause,
-    file_seek,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    plugin_cleanup,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    get_song_info,
-    NULL,
-    NULL,
-    get_song_tuple,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    file_mseek,
+    .init = plugin_init,
+    .about = wav_about,
+    .is_our_file = is_our_file,
+    .play_file = play_start,
+    .stop = play_stop,
+    .pause = play_pause,
+    .seek = file_seek,
+    .cleanup = plugin_cleanup,
+    .get_song_info = get_song_info,
+    .get_song_tuple = get_song_tuple,
+    .mseek = file_mseek,
 };
 
 static int
--- a/src/wav/wav.c	Fri Sep 07 04:12:39 2007 -0500
+++ b/src/wav/wav.c	Fri Sep 07 04:15:24 2007 -0500
@@ -38,36 +38,17 @@
 gchar *wav_fmts[] = { "wav", "raw", "pcm", NULL };
 
 InputPlugin wav_ip = {
-    NULL,
-    NULL,
-    "WAV Audio Plugin",                       /* Description */
-    wav_init,
-    NULL,
-    NULL,
-    is_our_file,
-    NULL,
-    play_file,
-    stop,
-    wav_pause,
-    seek,
-    NULL,
-    get_time,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    get_song_info,
-    NULL,                       /* file_info_box */
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    wav_fmts,
-    mseek,
+    .description = "WAV Audio Plugin",                       /* Description */
+    .init = wav_init,
+    .is_our_file = is_our_file,
+    .play_file = play_file,
+    .stop = stop,
+    .pause = wav_pause,
+    .seek = seek,
+    .get_time = get_time,
+    .get_song_info = get_song_info,
+    .vfs_extensions = wav_fmts,
+    .mseek = mseek,
 };
 
 WaveFile *wav_file = NULL;