]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Move make_taginfo() from mp3_afh.c to afh_common.c.
authorAndre Noll <maan@systemlinux.org>
Sun, 29 Jun 2008 19:02:36 +0000 (21:02 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 29 Jun 2008 19:02:36 +0000 (21:02 +0200)
This way, also the ogg vorbis code can use it.

afh.h
afh_common.c
mp3_afh.c

diff --git a/afh.h b/afh.h
index fbc0ba6f2bc5089b0e6f254dee042794aeec7f4c..e315f7870240b5796098e5cf9994acdfceea6cf5 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -103,3 +103,5 @@ const char *audio_format_name(int);
 void afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi,
                void *map, const char **buf, size_t *len);
 void afh_get_header(struct afh_info *afhi, void *map, const char **buf, size_t *len);
 void afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi,
                void *map, const char **buf, size_t *len);
 void afh_get_header(struct afh_info *afhi, void *map, const char **buf, size_t *len);
+char *make_taginfo(char *title, char *artist, char *album, char *year,
+               char *comment);
index 6f6e832484f1c7f2021885e9b2cab144789da27f..07e6a78c3aa4bcaf61e8645019c262473dbca023 100644 (file)
@@ -122,6 +122,21 @@ int guess_audio_format(const char *name)
        return -1;
 }
 
        return -1;
 }
 
+char *make_taginfo(char *title, char *artist, char *album, char *year,
+               char *comment)
+{
+       return make_message("%s: %s, by %s\n" /* taginfo1 */
+               "%s: A: %s, Y: %s, C: %s\n", /* taginfo 2*/
+               status_item_list[SI_TAGINFO1],
+               (title && *title)? title : "(title tag not set)",
+               (artist && *artist)? artist : "(artist tag not set)",
+               status_item_list[SI_TAGINFO2],
+               (album && *album)?  album : "(album tag not set)",
+               (year && *year)? year : "????",
+               (comment && *comment)? comment : "(comment tag not set)"
+       );
+}
+
 /**
  * Call get_file_info() to obtain an afhi structure.
  *
 /**
  * Call get_file_info() to obtain an afhi structure.
  *
index ebb6bf5291281d2fa9343fea21544617c79bfcdc..ca6441606c6efaeffa1531975387f90070dfb4ad 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -71,21 +71,6 @@ static const int mp3info_bitrate[2][3][14] = {
 static const int frame_size_index[] = {24000, 72000, 72000};
 static const char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mono", "invalid"};
 
 static const int frame_size_index[] = {24000, 72000, 72000};
 static const char *mode_text[] = {"stereo", "joint stereo", "dual channel", "mono", "invalid"};
 
-static char *make_taginfo(char *title, char *artist, char *album, char *year,
-               char *comment)
-{
-       return make_message("%s: %s, by %s\n" /* taginfo1 */
-               "%s: A: %s, Y: %s, C: %s\n", /* taginfo 2*/
-               status_item_list[SI_TAGINFO1],
-               (title && *title)? title : "(title tag not set)",
-               (artist && *artist)? artist : "(artist tag not set)",
-               status_item_list[SI_TAGINFO2],
-               (album && *album)?  album : "(album tag not set)",
-               (year && *year)? year : "????",
-               (comment && *comment)? comment : "(comment tag not set)"
-       );
-}
-
 #ifdef HAVE_LIBID3TAG
 
 #include <id3tag.h>
 #ifdef HAVE_LIBID3TAG
 
 #include <id3tag.h>