aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c2
-rw-r--r--src/audio.h2
-rw-r--r--src/audioOutput.c3
-rw-r--r--src/audioOutput.h5
-rw-r--r--src/audioOutputs/audioOutput_shout.c4
-rw-r--r--src/dbUtils.c2
-rw-r--r--src/decoder_api.h2
-rw-r--r--src/inputPlugins/_flac_common.c6
-rw-r--r--src/inputPlugins/_flac_common.h6
-rw-r--r--src/inputPlugins/aac_plugin.c4
-rw-r--r--src/inputPlugins/audiofile_plugin.c4
-rw-r--r--src/inputPlugins/flac_plugin.c14
-rw-r--r--src/inputPlugins/mod_plugin.c4
-rw-r--r--src/inputPlugins/mp3_plugin.c18
-rw-r--r--src/inputPlugins/mp4_plugin.c10
-rw-r--r--src/inputPlugins/mpc_plugin.c4
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c12
-rw-r--r--src/inputPlugins/wavpack_plugin.c4
-rw-r--r--src/song.h2
-rw-r--r--src/tag.c45
-rw-r--r--src/tag.h30
21 files changed, 93 insertions, 90 deletions
diff --git a/src/audio.c b/src/audio.c
index 409761177..b539d6f7c 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -419,7 +419,7 @@ void closeAudioDevice(void)
audioOpened = 0;
}
-void sendMetadataToAudioDevice(const MpdTag * tag)
+void sendMetadataToAudioDevice(const struct tag *tag)
{
unsigned int i;
diff --git a/src/audio.h b/src/audio.h
index 0032cff22..7fb2150cf 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -55,7 +55,7 @@ int isAudioDeviceOpen(void);
int isCurrentAudioFormat(const AudioFormat * audioFormat);
-void sendMetadataToAudioDevice(const MpdTag * tag);
+void sendMetadataToAudioDevice(const struct tag *tag);
/* these functions are called in the main parent process while the child
process is busy playing to the audio */
diff --git a/src/audioOutput.c b/src/audioOutput.c
index f165979d0..f197a789b 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -244,7 +244,8 @@ void finishAudioOutput(AudioOutput * audioOutput)
free(audioOutput->convBuffer);
}
-void sendMetadataToAudioOutput(AudioOutput * audioOutput, const MpdTag * tag)
+void sendMetadataToAudioOutput(AudioOutput * audioOutput,
+ const struct tag *tag)
{
if (!audioOutput->sendMetdataFunc)
return;
diff --git a/src/audioOutput.h b/src/audioOutput.h
index f82eedfba..16751cb12 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -50,7 +50,7 @@ typedef void (*AudioOutputDropBufferedAudioFunc) (AudioOutput * audioOutput);
typedef void (*AudioOutputCloseDeviceFunc) (AudioOutput * audioOutput);
typedef void (*AudioOutputSendMetadataFunc) (AudioOutput * audioOutput,
- const MpdTag * tag);
+ const struct tag *tag);
struct _AudioOutput {
int open;
@@ -104,7 +104,8 @@ void dropBufferedAudioOutput(AudioOutput * audioOutput);
void closeAudioOutput(AudioOutput * audioOutput);
void finishAudioOutput(AudioOutput * audioOutput);
int keepAudioOutputAlive(AudioOutput * audioOutput, int ms);
-void sendMetadataToAudioOutput(AudioOutput * audioOutput, const MpdTag * tag);
+void sendMetadataToAudioOutput(AudioOutput * audioOutput,
+ const struct tag *tag);
void printAllOutputPluginTypes(FILE * fp);
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 49d69eebd..bf57a593f 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -56,7 +56,7 @@ typedef struct _ShoutData {
int opened;
- MpdTag *tag;
+ struct tag *tag;
int tagToSend;
int timeout;
@@ -663,7 +663,7 @@ static int myShout_play(AudioOutput * audioOutput,
return 0;
}
-static void myShout_setTag(AudioOutput * audioOutput, MpdTag * tag)
+static void myShout_setTag(AudioOutput * audioOutput, struct tag *tag)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 519c1802d..1d66e316d 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -257,7 +257,7 @@ static void freeListCommandItem(ListCommandItem * item)
static void visitTag(int fd, Song * song, enum tag_type tagType)
{
int i;
- MpdTag *tag = song->tag;
+ struct tag *tag = song->tag;
if (tagType == LOCATE_TAG_FILE_TYPE) {
printSongUrl(fd, song);
diff --git a/src/decoder_api.h b/src/decoder_api.h
index 7428b3aab..3f953ec2c 100644
--- a/src/decoder_api.h
+++ b/src/decoder_api.h
@@ -74,7 +74,7 @@ typedef int (*decoder_file_decode_func) (struct decoder *, char *path);
/* file should be the full path! Returns NULL if a tag cannot be found
* or read */
-typedef MpdTag *(*decoder_tag_dup_func) (char *file);
+typedef struct tag *(*decoder_tag_dup_func) (char *file);
struct decoder_plugin {
const char *name;
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index 613c84154..1e400a18f 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -103,7 +103,7 @@ static const char *VORBIS_COMMENT_DISC_KEY = "discnumber";
static unsigned int commentMatchesAddToTag(const
FLAC__StreamMetadata_VorbisComment_Entry
* entry, unsigned int itemType,
- MpdTag ** tag)
+ struct tag ** tag)
{
const char *str;
size_t slen;
@@ -136,8 +136,8 @@ static unsigned int commentMatchesAddToTag(const
return 0;
}
-MpdTag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
- MpdTag * tag)
+struct tag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
+ struct tag * tag)
{
unsigned int i, j;
FLAC__StreamMetadata_VorbisComment_Entry *comments;
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index df9d7a84f..c4ca61cc1 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -149,7 +149,7 @@ typedef struct {
struct decoder *decoder;
InputStream *inStream;
ReplayGainInfo *replayGainInfo;
- MpdTag *tag;
+ struct tag *tag;
} FlacData;
/* initializes a given FlacData struct */
@@ -161,8 +161,8 @@ void flac_error_common_cb(const char *plugin,
FLAC__StreamDecoderErrorStatus status,
FlacData * data);
-MpdTag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
- MpdTag * tag);
+struct tag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
+ struct tag *tag);
/* keep this inlined, this is just macro but prettier :) */
static inline int flacSendChunk(FlacData * data)
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index f0796bb62..bd5e6a432 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -572,9 +572,9 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
return 0;
}
-static MpdTag *aacTagDup(char *file)
+static struct tag *aacTagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
int file_time = getAacTotalTime(file);
if (file_time >= 0) {
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index c3046770b..06c9fff4c 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -120,9 +120,9 @@ static int audiofile_decode(struct decoder * decoder, char *path)
return 0;
}
-static MpdTag *audiofileTagDup(char *file)
+static struct tag *audiofileTagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
int total_time = getAudiofileTotalTime(file);
if (total_time >= 0) {
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 4d9f8e8d4..a8dcc0b41 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -290,9 +290,9 @@ static FLAC__StreamDecoderWriteStatus flacWrite(const flac_decoder *dec,
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
-static MpdTag *flacMetadataDup(char *file, int *vorbisCommentFound)
+static struct tag *flacMetadataDup(char *file, int *vorbisCommentFound)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
FLAC__Metadata_SimpleIterator *it;
FLAC__StreamMetadata *block = NULL;
@@ -348,9 +348,9 @@ static MpdTag *flacMetadataDup(char *file, int *vorbisCommentFound)
return ret;
}
-static MpdTag *flacTagDup(char *file)
+static struct tag *flacTagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
int foundVorbisComment = 0;
ret = flacMetadataDup(file, &foundVorbisComment);
@@ -360,7 +360,7 @@ static MpdTag *flacTagDup(char *file)
return NULL;
}
if (!foundVorbisComment) {
- MpdTag *temp = id3Dup(file);
+ struct tag *temp = id3Dup(file);
if (temp) {
temp->time = ret->time;
freeMpdTag(ret);
@@ -464,9 +464,9 @@ static int flac_decode(struct decoder * decoder, InputStream * inStream)
/* some of this stuff is duplicated from oggflac_plugin.c */
extern struct decoder_plugin oggflacPlugin;
-static MpdTag *oggflac_tag_dup(char *file)
+static struct tag *oggflac_tag_dup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
FLAC__Metadata_Iterator *it;
FLAC__StreamMetadata *block;
FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new();
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 5e700016f..754dd6746 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -213,9 +213,9 @@ static int mod_decode(struct decoder * decoder, char *path)
return 0;
}
-static MpdTag *modTagDup(char *file)
+static struct tag *modTagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
MODULE *moduleHandle;
char *title;
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index c836a7a46..0d1c8e99a 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -299,13 +299,13 @@ static ReplayGainInfo *parseId3ReplayGainInfo(struct id3_tag *tag)
#ifdef HAVE_ID3TAG
static void mp3_parseId3Tag(mp3DecodeData * data, size_t tagsize,
- MpdTag ** mpdTag, ReplayGainInfo ** replayGainInfo)
+ struct tag ** mpdTag, ReplayGainInfo ** replayGainInfo)
{
struct id3_tag *id3Tag = NULL;
id3_length_t count;
id3_byte_t const *id3_data;
id3_byte_t *allocated = NULL;
- MpdTag *tmpMpdTag;
+ struct tag *tmpMpdTag;
ReplayGainInfo *tmpReplayGainInfo;
count = data->stream.bufend - data->stream.this_frame;
@@ -370,7 +370,7 @@ fail:
#endif
static enum mp3_action
-decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag,
+decodeNextFrameHeader(mp3DecodeData * data, struct tag ** tag,
ReplayGainInfo ** replayGainInfo)
{
enum mad_layer layer;
@@ -685,7 +685,7 @@ static int parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen)
}
static int decodeFirstFrame(mp3DecodeData * data,
- MpdTag ** tag, ReplayGainInfo ** replayGainInfo)
+ struct tag ** tag, ReplayGainInfo ** replayGainInfo)
{
struct decoder *decoder = data->decoder;
struct xing xing;
@@ -813,7 +813,7 @@ static int getMp3TotalTime(char *file)
}
static int openMp3FromInputStream(InputStream * inStream, mp3DecodeData * data,
- struct decoder * decoder, MpdTag ** tag,
+ struct decoder * decoder, struct tag ** tag,
ReplayGainInfo ** replayGainInfo)
{
initMp3DecodeData(data, decoder, inStream);
@@ -896,7 +896,7 @@ mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo)
}
if (data->inStream->metaTitle) {
- MpdTag *tag = newMpdTag();
+ struct tag *tag = newMpdTag();
if (data->inStream->metaName) {
addItemToMpdTag(tag,
TAG_ITEM_NAME,
@@ -1032,7 +1032,7 @@ static void initAudioFormatFromMp3DecodeData(mp3DecodeData * data,
static int mp3_decode(struct decoder * decoder, InputStream * inStream)
{
mp3DecodeData data;
- MpdTag *tag = NULL;
+ struct tag *tag = NULL;
ReplayGainInfo *replayGainInfo = NULL;
AudioFormat audio_format;
@@ -1092,9 +1092,9 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream)
return 0;
}
-static MpdTag *mp3_tagDup(char *file)
+static struct tag *mp3_tagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
int total_time;
ret = id3Dup(file);
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index f8af07d2c..89519cb0c 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -296,9 +296,9 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
return 0;
}
-static MpdTag *mp4DataDup(char *file, int *mp4MetadataFound)
+static struct tag *mp4DataDup(char *file, int *mp4MetadataFound)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
InputStream inStream;
mp4ff_t *mp4fh;
mp4ff_callback_t *callback;
@@ -385,16 +385,16 @@ static MpdTag *mp4DataDup(char *file, int *mp4MetadataFound)
return ret;
}
-static MpdTag *mp4TagDup(char *file)
+static struct tag *mp4TagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
int mp4MetadataFound = 0;
ret = mp4DataDup(file, &mp4MetadataFound);
if (!ret)
return NULL;
if (!mp4MetadataFound) {
- MpdTag *temp = id3Dup(file);
+ struct tag *temp = id3Dup(file);
if (temp) {
temp->time = ret->time;
freeMpdTag(ret);
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index 611c4f4d6..2ae6bf141 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -279,9 +279,9 @@ static float mpcGetTime(char *file)
return total_time;
}
-static MpdTag *mpcTagDup(char *file)
+static struct tag *mpcTagDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
float total_time = mpcGetTime(file);
if (total_time < 0) {
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index 808af92b0..6d160dcdc 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -140,7 +140,7 @@ static const char *VORBIS_COMMENT_DISC_KEY = "discnumber";
static unsigned int ogg_parseCommentAddToTag(char *comment,
unsigned int itemType,
- MpdTag ** tag)
+ struct tag ** tag)
{
const char *needle;
unsigned int len;
@@ -168,9 +168,9 @@ static unsigned int ogg_parseCommentAddToTag(char *comment,
return 0;
}
-static MpdTag *oggCommentsParse(char **comments)
+static struct tag *oggCommentsParse(char **comments)
{
- MpdTag *tag = NULL;
+ struct tag *tag = NULL;
while (*comments) {
int j;
@@ -187,7 +187,7 @@ static MpdTag *oggCommentsParse(char **comments)
static void putOggCommentsIntoOutputBuffer(char *streamName,
char **comments)
{
- MpdTag *tag;
+ struct tag *tag;
tag = oggCommentsParse(comments);
if (!tag && streamName) {
@@ -337,9 +337,9 @@ static int oggvorbis_decode(struct decoder * decoder, InputStream * inStream)
return 0;
}
-static MpdTag *oggvorbis_TagDup(char *file)
+static struct tag *oggvorbis_TagDup(char *file)
{
- MpdTag *ret;
+ struct tag *ret;
FILE *fp;
OggVorbis_File vf;
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 2253feb41..13c8f8769 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -281,10 +281,10 @@ static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc)
/*
* Reads metainfo from the specified file.
*/
-static MpdTag *wavpack_tagdup(char *fname)
+static struct tag *wavpack_tagdup(char *fname)
{
WavpackContext *wpc;
- MpdTag *tag;
+ struct tag *tag;
char error[ERRORLEN];
char *s;
int ssize;
diff --git a/src/song.h b/src/song.h
index 8e2de410a..4026fb7a9 100644
--- a/src/song.h
+++ b/src/song.h
@@ -36,7 +36,7 @@
typedef struct _Song {
char *url;
mpd_sint8 type;
- MpdTag *tag;
+ struct tag *tag;
struct _Directory *parentDir;
time_t mtime;
} Song;
diff --git a/src/tag.c b/src/tag.c
index c1ccd0a42..e58b0827b 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -114,7 +114,7 @@ void printTagTypes(int fd)
}
}
-void printMpdTag(int fd, MpdTag * tag)
+void printMpdTag(int fd, struct tag *tag)
{
int i;
@@ -164,8 +164,8 @@ static id3_utf8_t * processID3FieldString (int is_id3v1, const id3_ucs4_t *ucs4,
return utf8;
}
-static MpdTag *getID3Info(
- struct id3_tag *tag, const char *id, int type, MpdTag * mpdTag)
+static struct tag *getID3Info(
+ struct id3_tag *tag, const char *id, int type, struct tag *mpdTag)
{
struct id3_frame const *frame;
id3_ucs4_t const *ucs4;
@@ -283,9 +283,9 @@ static MpdTag *getID3Info(
#endif
#ifdef HAVE_ID3TAG
-MpdTag *parseId3Tag(struct id3_tag * tag)
+struct tag *parseId3Tag(struct id3_tag * tag)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
ret = getID3Info(tag, ID3_FRAME_ARTIST, TAG_ITEM_ARTIST, ret);
ret = getID3Info(tag, ID3_FRAME_TITLE, TAG_ITEM_TITLE, ret);
@@ -425,9 +425,9 @@ static struct id3_tag *findId3TagFromEnd(FILE * stream)
}
#endif
-MpdTag *id3Dup(char *file)
+struct tag *id3Dup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
#ifdef HAVE_ID3TAG
struct id3_tag *tag;
FILE *stream;
@@ -453,9 +453,9 @@ MpdTag *id3Dup(char *file)
return ret;
}
-MpdTag *apeDup(char *file)
+struct tag *apeDup(char *file)
{
- MpdTag *ret = NULL;
+ struct tag *ret = NULL;
FILE *fp;
int tagCount;
char *buffer = NULL;
@@ -574,16 +574,16 @@ fail:
return ret;
}
-MpdTag *newMpdTag(void)
+struct tag *newMpdTag(void)
{
- MpdTag *ret = xmalloc(sizeof(MpdTag));
+ struct tag *ret = xmalloc(sizeof(*ret));
ret->items = NULL;
ret->time = -1;
ret->numOfItems = 0;
return ret;
}
-static void deleteItem(MpdTag * tag, int idx)
+static void deleteItem(struct tag *tag, int idx)
{
assert(idx < tag->numOfItems);
tag->numOfItems--;
@@ -598,14 +598,14 @@ static void deleteItem(MpdTag * tag, int idx)
if (tag->numOfItems > 0) {
tag->items = xrealloc(tag->items,
- tag->numOfItems * sizeof(MpdTagItem));
+ tag->numOfItems * sizeof(*tag->items));
} else {
free(tag->items);
tag->items = NULL;
}
}
-void clearItemsFromMpdTag(MpdTag * tag, enum tag_type type)
+void clearItemsFromMpdTag(struct tag *tag, enum tag_type type)
{
int i;
@@ -618,7 +618,7 @@ void clearItemsFromMpdTag(MpdTag * tag, enum tag_type type)
}
}
-static void clearMpdTag(MpdTag * tag)
+static void clearMpdTag(struct tag *tag)
{
int i;
@@ -636,15 +636,15 @@ static void clearMpdTag(MpdTag * tag)
tag->time = -1;
}
-void freeMpdTag(MpdTag * tag)
+void freeMpdTag(struct tag *tag)
{
clearMpdTag(tag);
free(tag);
}
-MpdTag *mpdTagDup(MpdTag * tag)
+struct tag *mpdTagDup(struct tag *tag)
{
- MpdTag *ret;
+ struct tag *ret;
int i;
if (!tag)
@@ -660,7 +660,7 @@ MpdTag *mpdTagDup(MpdTag * tag)
return ret;
}
-int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2)
+int mpdTagsAreEqual(struct tag *tag1, struct tag *tag2)
{
int i;
@@ -696,7 +696,7 @@ int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2)
} \
}
-static void appendToTagItems(MpdTag * tag, enum tag_type type,
+static void appendToTagItems(struct tag *tag, enum tag_type type,
const char *value, size_t len)
{
unsigned int i = tag->numOfItems;
@@ -709,7 +709,8 @@ static void appendToTagItems(MpdTag * tag, enum tag_type type,
stripReturnChar(duplicated);
tag->numOfItems++;
- tag->items = xrealloc(tag->items, tag->numOfItems * sizeof(MpdTagItem));
+ tag->items = xrealloc(tag->items,
+ tag->numOfItems * sizeof(*tag->items));
tag->items[i].type = type;
tag->items[i].value = getTagItemString(type, duplicated);
@@ -717,7 +718,7 @@ static void appendToTagItems(MpdTag * tag, enum tag_type type,
free(duplicated);
}
-void addItemToMpdTagWithLen(MpdTag * tag, enum tag_type itemType,
+void addItemToMpdTagWithLen(struct tag *tag, enum tag_type itemType,
const char *value, size_t len)
{
if (ignoreTagItems[itemType])
diff --git a/src/tag.h b/src/tag.h
index a9bf19934..e8a168722 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -45,34 +45,34 @@ enum tag_type {
extern const char *mpdTagItemKeys[];
-typedef struct _MpdTagItem {
+struct tag_item {
enum tag_type type;
char *value;
-} MpdTagItem;
+};
-typedef struct _MpdTag {
+struct tag {
int time;
- MpdTagItem *items;
+ struct tag_item *items;
mpd_uint8 numOfItems;
-} MpdTag;
+};
#ifdef HAVE_ID3TAG
-MpdTag *parseId3Tag(struct id3_tag *);
+struct tag *parseId3Tag(struct id3_tag *);
#endif
-MpdTag *apeDup(char *file);
+struct tag *apeDup(char *file);
-MpdTag *id3Dup(char *file);
+struct tag *id3Dup(char *file);
-MpdTag *newMpdTag(void);
+struct tag *newMpdTag(void);
void initTagConfig(void);
-void clearItemsFromMpdTag(MpdTag * tag, enum tag_type itemType);
+void clearItemsFromMpdTag(struct tag *tag, enum tag_type itemType);
-void freeMpdTag(MpdTag * tag);
+void freeMpdTag(struct tag *tag);
-void addItemToMpdTagWithLen(MpdTag * tag, enum tag_type itemType,
+void addItemToMpdTagWithLen(struct tag *tag, enum tag_type itemType,
const char *value, size_t len);
#define addItemToMpdTag(tag, itemType, value) \
@@ -80,10 +80,10 @@ void addItemToMpdTagWithLen(MpdTag * tag, enum tag_type itemType,
void printTagTypes(int fd);
-void printMpdTag(int fd, MpdTag * tag);
+void printMpdTag(int fd, struct tag *tag);
-MpdTag *mpdTagDup(MpdTag * tag);
+struct tag *mpdTagDup(struct tag *tag);
-int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2);
+int mpdTagsAreEqual(struct tag *tag1, struct tag *tag2);
#endif