[easytag] Fix compilation if Ogg support is not available



commit 9cfb3edb17a459c3612f51c635185aad0bc092b0
Author: David King <amigadave amigadave com>
Date:   Mon Apr 21 16:18:12 2014 +0100

    Fix compilation if Ogg support is not available
    
    Add some ifdefs to check whether ENABLE_OGG is defined. Remove leftover
    prototype in WavPack tag code.

 src/ogg_tag.h     |   16 +++++++++++-----
 src/vcedit.h      |   14 ++++++++------
 src/wavpack_tag.c |   19 +------------------
 3 files changed, 20 insertions(+), 29 deletions(-)
---
diff --git a/src/ogg_tag.h b/src/ogg_tag.h
index f2137c1..d2099a5 100644
--- a/src/ogg_tag.h
+++ b/src/ogg_tag.h
@@ -24,6 +24,11 @@
 
 
 #include <glib.h>
+
+#include "config.h"
+
+#ifdef ENABLE_OGG
+
 #include "vcedit.h"
 #include "et_core.h"
 
@@ -33,9 +38,10 @@
 gboolean ogg_tag_read_file_tag (gchar *filename, File_Tag *FileTag,
                                 GError **error);
 gboolean ogg_tag_write_file_tag (ET_File *ETFile, GError **error);
-void
-et_add_file_tags_from_vorbis_comments (vorbis_comment *vc, File_Tag *FileTag,
-                                       const gchar *filename_utf8);
-void
-et_add_vorbis_comments_from_file_tags (vorbis_comment *vc, File_Tag *FileTag);
+
+void et_add_file_tags_from_vorbis_comments (vorbis_comment *vc, File_Tag *FileTag, const gchar 
*filename_utf8);
+void et_add_vorbis_comments_from_file_tags (vorbis_comment *vc, File_Tag *FileTag);
+
+#endif /* ENABLE_OGG */
+
 #endif /* __OGG_TAG_H__ */
diff --git a/src/vcedit.h b/src/vcedit.h
index 3c25eb8..ba1f716 100644
--- a/src/vcedit.h
+++ b/src/vcedit.h
@@ -11,9 +11,11 @@
 #ifndef __VCEDIT_H
 #define __VCEDIT_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif 
+#include "config.h"
+
+#ifdef ENABLE_OGG
+
+G_BEGIN_DECLS
 
 #include <stdio.h>
 #include <ogg/ogg.h>
@@ -65,8 +67,8 @@ extern vorbis_comment  *vcedit_comments(vcedit_state *state);
 extern int              vcedit_open(vcedit_state *state, GFile *in, GError **error);
 extern int              vcedit_write(vcedit_state *state, GFile *file, GError **error);
 
-#ifdef __cplusplus
-}
-#endif 
+G_END_DECLS
+
+#endif /* ENABLE_OGG */
 
 #endif /* __VCEDIT_H */
diff --git a/src/wavpack_tag.c b/src/wavpack_tag.c
index 61cc076..cc2a4c2 100644
--- a/src/wavpack_tag.c
+++ b/src/wavpack_tag.c
@@ -18,7 +18,7 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <config.h>
+#include "config.h"
 
 #ifdef ENABLE_WAVPACK
 
@@ -32,7 +32,6 @@
 #include <wavpack/wavpack.h>
 
 #include "easytag.h"
-#include "vcedit.h"
 #include "et_core.h"
 #include "picture.h"
 #include "charset.h"
@@ -40,22 +39,6 @@
 #include "wavpack_tag.h"
 
 
-/***************
- * Declaration *
- ***************/
-
-#define MULTIFIELD_SEPARATOR " - "
-
-/**************
- * Prototypes *
- **************/
-gboolean Wavpack_Tag_Write_File (FILE *file_in, gchar *filename_in, vcedit_state *state);
-
-
-/*************
- * Functions *
- *************/
-
 /*
  * For the APEv2 tags, the following field names are officially supported and
  * recommended by WavPack (although there are no restrictions on what field names


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]