aboutsummaryrefslogtreecommitdiffstats
path: root/src/metadataChunk.c
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
committerAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
commit29a25b9933b32800f58dd73d5d1fc21993071c92 (patch)
tree4f456a6f8e44d42acc289c35534ea3e59c0aa96f /src/metadataChunk.c
parent099f0e103f7591eef81183292d704b3a77a99018 (diff)
downloadmpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.gz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.xz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.zip
Add mpd-indent.sh
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/metadataChunk.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/metadataChunk.c b/src/metadataChunk.c
index dac3360bc..7d57c00af 100644
--- a/src/metadataChunk.c
+++ b/src/metadataChunk.c
@@ -20,9 +20,10 @@
#include <string.h>
-static void initMetadataChunk(MetadataChunk * chunk) {
+static void initMetadataChunk(MetadataChunk * chunk)
+{
memset(chunk, 0, sizeof(MetadataChunk));
-
+
chunk->name = -1;
chunk->artist = -1;
chunk->album = -1;
@@ -35,10 +36,11 @@ static void initMetadataChunk(MetadataChunk * chunk) {
} \
}
-MpdTag * metadataChunkToMpdTagDup(MetadataChunk * chunk) {
- MpdTag * ret = newMpdTag();
+MpdTag *metadataChunkToMpdTagDup(MetadataChunk * chunk)
+{
+ MpdTag *ret = newMpdTag();
- chunk->buffer[METADATA_BUFFER_LENGTH-1] = '\0';
+ chunk->buffer[METADATA_BUFFER_LENGTH - 1] = '\0';
dupElementToTag(TAG_ITEM_NAME, chunk->name);
dupElementToTag(TAG_ITEM_TITLE, chunk->title);
@@ -59,17 +61,19 @@ MpdTag * metadataChunkToMpdTagDup(MetadataChunk * chunk) {
} \
}
-void copyMpdTagToMetadataChunk(MpdTag * tag, MetadataChunk * chunk) {
+void copyMpdTagToMetadataChunk(MpdTag * tag, MetadataChunk * chunk)
+{
int pos = 0;
int slen;
int i;
initMetadataChunk(chunk);
- if(!tag) return;
+ if (!tag)
+ return;
- for(i = 0; i < tag->numOfItems; i++) {
- switch(tag->items[i].type) {
+ for (i = 0; i < tag->numOfItems; i++) {
+ switch (tag->items[i].type) {
case TAG_ITEM_NAME:
copyStringToChunk(tag->items[i].value, chunk->name);
break;