diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-25 00:11:46 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-25 00:11:46 +0300 |
commit | 6db300c686c28f05562930b5ff58487f625e4a01 (patch) | |
tree | e79ca14f3bf56769919df7a7aa2ad343f7bf46c9 /libid3tag | |
parent | 10424c8227706ee06981dd8ecaaef905b8fd61bf (diff) | |
download | idest-6db300c686c28f05562930b5ff58487f625e4a01.tar.gz idest-6db300c686c28f05562930b5ff58487f625e4a01.tar.bz2 |
Minor change
* libid3tag/compat.gperf: Reformat
Diffstat (limited to 'libid3tag')
-rw-r--r-- | libid3tag/compat.gperf | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libid3tag/compat.gperf b/libid3tag/compat.gperf index 4e24613..6fa1d4e 100644 --- a/libid3tag/compat.gperf +++ b/libid3tag/compat.gperf @@ -133,8 +133,8 @@ WPB, EQ(WPUB) /* Publishers official webpage */ WXX, EQ(WXXX) /* User defined URL link frame */ %% -static -int translate_TCON(struct id3_frame *frame, char const *oldid, +static int +translate_TCON(struct id3_frame *frame, char const *oldid, id3_byte_t const *data, id3_length_t length) { id3_byte_t const *end; @@ -150,7 +150,8 @@ int translate_TCON(struct id3_frame *frame, char const *oldid, end = data + length; - if (id3_field_parse(&frame->fields[0], &data, end - data, &encoding) == -1) + if (id3_field_parse(&frame->fields[0], &data, + end - data, &encoding) == -1) goto fail; string = id3_parse_string(&data, end - data, encoding, 0); @@ -193,7 +194,8 @@ int translate_TCON(struct id3_frame *frame, char const *oldid, * NAME: compat->fixup() * DESCRIPTION: finish compatibility translations */ -int id3_compat_fixup(struct id3_tag *tag) +int +id3_compat_fixup(struct id3_tag *tag) { struct id3_frame *frame; unsigned int index; @@ -211,7 +213,8 @@ int id3_compat_fixup(struct id3_tag *tag) */ index = 0; - while ((frame = id3_tag_findframe(tag, ID3_FRAME_OBSOLETE, index++))) { + while ((frame = id3_tag_findframe(tag, ID3_FRAME_OBSOLETE, + index++))) { char const *id; id3_byte_t const *data, *end; id3_length_t length; @@ -248,8 +251,7 @@ int id3_compat_fixup(struct id3_tag *tag) timestamp[1] = string[1]; timestamp[2] = string[2]; timestamp[3] = string[3]; - } - else if (strcmp(id, "TDAT") == 0 || + } else if (strcmp(id, "TDAT") == 0 || strcmp(id, "YTDA") == 0) { timestamp[4] = '-'; timestamp[5] = string[2]; @@ -257,8 +259,7 @@ int id3_compat_fixup(struct id3_tag *tag) timestamp[7] = '-'; timestamp[8] = string[0]; timestamp[9] = string[1]; - } - else { /* TIME or YTIM */ + } else { /* TIME or YTIM */ timestamp[10] = 'T'; timestamp[11] = string[0]; timestamp[12] = string[1]; @@ -281,7 +282,8 @@ int id3_compat_fixup(struct id3_tag *tag) if (id3_field_settextencoding(&frame->fields[0], ID3_FIELD_TEXTENCODING_ISO_8859_1) == -1 || - id3_field_setstrings(&frame->fields[1], 1, &strings) == -1 || + id3_field_setstrings(&frame->fields[1], 1, + &strings) == -1 || id3_tag_attachframe(tag, frame) == -1) { id3_frame_delete(frame); goto fail; |