Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

‎ 452 Commits   2 Branches   1 Tag   |
Index: Makefile
===================================================================
--- Makefile	(nonexistent)
+++ Makefile	(revision 5)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/m/mad/libid3tag
+
+versions    = 0.15.1b
+pkgname     = libid3tag
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/libid3tag-0.15.1b.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-0.15.1b-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: create-0.15.1b-patch/create.patch.sh
===================================================================
--- create-0.15.1b-patch/create.patch.sh	(nonexistent)
+++ create-0.15.1b-patch/create.patch.sh	(revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=0.15.1b
+
+tar --files-from=file.list -xzvf ../libid3tag-$VERSION.tar.gz
+mv libid3tag-$VERSION libid3tag-$VERSION-orig
+
+cp -rf ./libid3tag-$VERSION-new ./libid3tag-$VERSION
+
+diff --unified -Nr  libid3tag-$VERSION-orig  libid3tag-$VERSION > libid3tag-$VERSION.patch
+
+mv libid3tag-$VERSION.patch ../patches
+
+rm -rf ./libid3tag-$VERSION
+rm -rf ./libid3tag-$VERSION-orig

Property changes on: create-0.15.1b-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-0.15.1b-patch/file.list
===================================================================
--- create-0.15.1b-patch/file.list	(nonexistent)
+++ create-0.15.1b-patch/file.list	(revision 5)
@@ -0,0 +1,7 @@
+libid3tag-0.15.1b/compat.c
+libid3tag-0.15.1b/compat.gperf
+libid3tag-0.15.1b/compat.h
+libid3tag-0.15.1b/genre.dat
+libid3tag-0.15.1b/genre.dat.in
+libid3tag-0.15.1b/parse.c
+libid3tag-0.15.1b/utf16.c
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.c
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.c	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.c	(revision 5)
@@ -0,0 +1,503 @@
+/* C code produced by gperf version 3.0.1 */
+/* Command-line: gperf -tCcTonD -K id -N id3_compat_lookup -s -3 -k '*' compat.gperf  */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#endif
+
+#line 1 "compat.gperf"
+
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Id: compat.gperf,v 1.11 2004/01/23 09:41:32 rob Exp 
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include <stdlib.h>
+# include <string.h>
+
+# ifdef HAVE_ASSERT_H
+#  include <assert.h>
+# endif
+
+# include "id3tag.h"
+# include "compat.h"
+# include "frame.h"
+# include "field.h"
+# include "parse.h"
+# include "ucs4.h"
+
+# define EQ(id)    #id, 0
+# define OBSOLETE    0, 0
+# define TX(id)    #id, translate_##id
+
+static id3_compat_func_t translate_TCON;
+
+#define TOTAL_KEYWORDS 73
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 4
+#define MIN_HASH_VALUE 6
+#define MAX_HASH_VALUE 127
+/* maximum key range = 122, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (str, len)
+     register const char *str;
+     register unsigned int len;
+{
+  static const unsigned char asso_values[] =
+    {
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128,  64,
+       58,  20,  15, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128,  10,  18,   3,   6,   1,
+       47,   0, 128,  42,  62,  30,  31,   0,  19,  52,
+       10,  24,   8,  30,   5,   3,  30,   8,  25,  47,
+        3, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+      128, 128, 128, 128, 128, 128, 128
+    };
+  register int hval = 0;
+
+  switch (len)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[3]];
+      /*FALLTHROUGH*/
+      case 3:
+        hval += asso_values[(unsigned char)str[2]];
+      /*FALLTHROUGH*/
+      case 2:
+        hval += asso_values[(unsigned char)str[1]+1];
+      /*FALLTHROUGH*/
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval;
+}
+
+#ifdef __GNUC__
+__inline
+#endif
+struct id3_compat const *
+id3_compat_lookup (str, len)
+     register char const *str;
+     register size_t len;
+{
+  static const struct id3_compat wordlist[] =
+    {
+#line 97 "compat.gperf"
+      {"TLE",  EQ(TLEN)  /* Length */},
+#line 68 "compat.gperf"
+      {"ETC",  EQ(ETCO)  /* Event timing codes */},
+#line 126 "compat.gperf"
+      {"ULT",  EQ(USLT)  /* Unsynchronised lyric/text transcription */},
+#line 123 "compat.gperf"
+      {"TYE",  OBSOLETE  /* Year [obsolete] */},
+#line 92 "compat.gperf"
+      {"TFT",  EQ(TFLT)  /* File type */},
+#line 84 "compat.gperf"
+      {"TCM",  EQ(TCOM)  /* Composer */},
+#line 66 "compat.gperf"
+      {"EQU",  OBSOLETE  /* Equalization [obsolete] */},
+#line 63 "compat.gperf"
+      {"COM",  EQ(COMM)  /* Comments */},
+#line 130 "compat.gperf"
+      {"WCM",  EQ(WCOM)  /* Commercial information */},
+#line 96 "compat.gperf"
+      {"TLA",  EQ(TLAN)  /* Language(s) */},
+#line 88 "compat.gperf"
+      {"TDA",  OBSOLETE  /* Date [obsolete] */},
+#line 124 "compat.gperf"
+      {"TYER", OBSOLETE  /* Year [obsolete] */},
+#line 83 "compat.gperf"
+      {"TBP",  EQ(TBPM)  /* BPM (beats per minute) */},
+#line 87 "compat.gperf"
+      {"TCR",  EQ(TCOP)  /* Copyright message */},
+#line 104 "compat.gperf"
+      {"TOT",  EQ(TOAL)  /* Original album/movie/show title */},
+#line 89 "compat.gperf"
+      {"TDAT", OBSOLETE  /* Date [obsolete] */},
+#line 67 "compat.gperf"
+      {"EQUA", OBSOLETE  /* Equalization [obsolete] */},
+#line 102 "compat.gperf"
+      {"TOR",  EQ(TDOR)  /* Original release year [obsolete] */},
+#line 131 "compat.gperf"
+      {"WCP",  EQ(WCOP)  /* Copyright/legal information */},
+#line 99 "compat.gperf"
+      {"TOA",  EQ(TOPE)  /* Original artist(s)/performer(s) */},
+#line 78 "compat.gperf"
+      {"RVA",  OBSOLETE  /* Relative volume adjustment [obsolete] */},
+#line 120 "compat.gperf"
+      {"TT3",  EQ(TIT3)  /* Subtitle/description refinement */},
+#line 98 "compat.gperf"
+      {"TMT",  EQ(TMED)  /* Media type */},
+#line 76 "compat.gperf"
+      {"POP",  EQ(POPM)  /* Popularimeter */},
+#line 74 "compat.gperf"
+      {"MLL",  EQ(MLLT)  /* MPEG location lookup table */},
+#line 79 "compat.gperf"
+      {"RVAD", OBSOLETE  /* Relative volume adjustment [obsolete] */},
+#line 65 "compat.gperf"
+      {"CRM",  OBSOLETE  /* Encrypted meta frame [obsolete] */},
+#line 128 "compat.gperf"
+      {"WAR",  EQ(WOAR)  /* Official artist/performer webpage */},
+#line 80 "compat.gperf"
+      {"SLT",  EQ(SYLT)  /* Synchronised lyric/text */},
+#line 81 "compat.gperf"
+      {"STC",  EQ(SYTC)  /* Synchronised tempo codes */},
+#line 95 "compat.gperf"
+      {"TKE",  EQ(TKEY)  /* Initial key */},
+#line 111 "compat.gperf"
+      {"TRC",  EQ(TSRC)  /* ISRC (international standard recording code) */},
+#line 109 "compat.gperf"
+      {"TPA",  EQ(TPOS)  /* Part of a set */},
+#line 117 "compat.gperf"
+      {"TSS",  EQ(TSSE)  /* Software/hardware and settings used for encoding */},
+#line 112 "compat.gperf"
+      {"TRD",  OBSOLETE  /* Recording dates [obsolete] */},
+#line 64 "compat.gperf"
+      {"CRA",  EQ(AENC)  /* Audio encryption */},
+#line 108 "compat.gperf"
+      {"TP4",  EQ(TPE4)  /* Interpreted, remixed, or otherwise modified by */},
+#line 125 "compat.gperf"
+      {"UFI",  EQ(UFID)  /* Unique file identifier */},
+#line 101 "compat.gperf"
+      {"TOL",  EQ(TOLY)  /* Original lyricist(s)/text writer(s) */},
+#line 110 "compat.gperf"
+      {"TPB",  EQ(TPUB)  /* Publisher */},
+#line 73 "compat.gperf"
+      {"MCI",  EQ(MCDI)  /* Music CD identifier */},
+#line 107 "compat.gperf"
+      {"TP3",  EQ(TPE3)  /* Conductor/performer refinement */},
+#line 132 "compat.gperf"
+      {"WPB",  EQ(WPUB)  /* Publishers official webpage */},
+#line 113 "compat.gperf"
+      {"TRDA", OBSOLETE  /* Recording dates [obsolete] */},
+#line 115 "compat.gperf"
+      {"TSI",  OBSOLETE  /* Size [obsolete] */},
+#line 90 "compat.gperf"
+      {"TDY",  EQ(TDLY)  /* Playlist delay */},
+#line 82 "compat.gperf"
+      {"TAL",  EQ(TALB)  /* Album/movie/show title */},
+#line 116 "compat.gperf"
+      {"TSIZ", OBSOLETE  /* Size [obsolete] */},
+#line 129 "compat.gperf"
+      {"WAS",  EQ(WOAS)  /* Official audio source webpage */},
+#line 121 "compat.gperf"
+      {"TXT",  EQ(TEXT)  /* Lyricist/text writer */},
+#line 62 "compat.gperf"
+      {"CNT",  EQ(PCNT)  /* Play counter */},
+#line 100 "compat.gperf"
+      {"TOF",  EQ(TOFN)  /* Original filename */},
+#line 85 "compat.gperf"
+      {"TCO",  TX(TCON)  /* Content type */},
+#line 114 "compat.gperf"
+      {"TRK",  EQ(TRCK)  /* Track number/position in set */},
+#line 119 "compat.gperf"
+      {"TT2",  EQ(TIT2)  /* Title/songname/content description */},
+#line 93 "compat.gperf"
+      {"TIM",  OBSOLETE  /* Time [obsolete] */},
+#line 94 "compat.gperf"
+      {"TIME", OBSOLETE  /* Time [obsolete] */},
+#line 103 "compat.gperf"
+      {"TORY", EQ(TDOR)  /* Original release year [obsolete] */},
+#line 91 "compat.gperf"
+      {"TEN",  EQ(TENC)  /* Encoded by */},
+#line 118 "compat.gperf"
+      {"TT1",  EQ(TIT1)  /* Content group description */},
+#line 127 "compat.gperf"
+      {"WAF",  EQ(WOAF)  /* Official audio file webpage */},
+#line 75 "compat.gperf"
+      {"PIC",  EQ(APIC)  /* Attached picture */},
+#line 122 "compat.gperf"
+      {"TXX",  EQ(TXXX)  /* User defined text information frame */},
+#line 133 "compat.gperf"
+      {"WXX",  EQ(WXXX)  /* User defined URL link frame */},
+#line 86 "compat.gperf"
+      {"TCON", TX(TCON)  /* Content type */},
+#line 77 "compat.gperf"
+      {"REV",  EQ(RVRB)  /* Reverb */},
+#line 106 "compat.gperf"
+      {"TP2",  EQ(TPE2)  /* Band/orchestra/accompaniment */},
+#line 105 "compat.gperf"
+      {"TP1",  EQ(TPE1)  /* Lead performer(s)/soloist(s) */},
+#line 61 "compat.gperf"
+      {"BUF",  EQ(RBUF)  /* Recommended buffer size */},
+#line 70 "compat.gperf"
+      {"IPL",  EQ(TIPL)  /* Involved people list */},
+#line 69 "compat.gperf"
+      {"GEO",  EQ(GEOB)  /* General encapsulated object */},
+#line 72 "compat.gperf"
+      {"LNK",  EQ(LINK)  /* Linked information */},
+#line 71 "compat.gperf"
+      {"IPLS", EQ(TIPL)  /* Involved people list */}
+    };
+
+  static const short lookup[] =
+    {
+      -1, -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,
+       8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
+      21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+      -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+      48, 49, -1, -1, 50, -1, 51, 52, -1, 53, 54, 55, 56, -1,
+      57, 58, 59, 60, -1, 61, -1, 62, -1, -1, 63, -1, 64, -1,
+      -1, 65, -1, 66, -1, -1, -1, -1, -1, 67, -1, 68, -1, 69,
+      -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+      -1, 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+      -1, 72
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register int index = lookup[key];
+
+          if (index >= 0)
+            {
+              register const char *s = wordlist[index].id;
+
+              if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+                return &wordlist[index];
+            }
+        }
+    }
+  return 0;
+}
+#line 134 "compat.gperf"
+
+
+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;
+  enum id3_field_textencoding encoding;
+  id3_ucs4_t *string = 0, *ptr, *endptr;
+  int result = 0;
+
+  /* translate old TCON syntax into multiple strings */
+
+  assert(frame->nfields == 2);
+
+  encoding = ID3_FIELD_TEXTENCODING_ISO_8859_1;
+
+  end = data + length;
+
+  if (id3_field_parse(&frame->fields[0], &data, end - data, &encoding) == -1)
+    goto fail;
+
+  string = id3_parse_string(&data, end - data, encoding, 0);
+  if (string == 0)
+    goto fail;
+
+  ptr = string;
+  while (*ptr == '(') {
+    if (*++ptr == '(')
+      break;
+
+    endptr = ptr;
+    while (*endptr && *endptr != ')')
+      ++endptr;
+
+    if (*endptr)
+      *endptr++ = 0;
+
+    if (id3_field_addstring(&frame->fields[1], ptr) == -1)
+      goto fail;
+
+    ptr = endptr;
+  }
+
+  if (*ptr && id3_field_addstring(&frame->fields[1], ptr) == -1)
+    goto fail;
+
+  if (0) {
+  fail:
+    result = -1;
+  }
+
+  if (string)
+    free(string);
+
+  return result;
+}
+
+/*
+ * NAME:	compat->fixup()
+ * DESCRIPTION:	finish compatibility translations
+ */
+int id3_compat_fixup(struct id3_tag *tag)
+{
+  struct id3_frame *frame;
+  unsigned int index;
+  id3_ucs4_t timestamp[17] = { 0 };
+  int result = 0;
+
+  /* create a TDRC frame from obsolete TYER/TDAT/TIME frames */
+
+  /*
+   * TYE/TYER: YYYY
+   * TDA/TDAT: DDMM
+   * TIM/TIME: HHMM
+   *
+   * TDRC: yyyy-MM-ddTHH:mm
+   */
+
+  index = 0;
+  while ((frame = id3_tag_findframe(tag, ID3_FRAME_OBSOLETE, index++))) {
+    char const *id;
+    id3_byte_t const *data, *end;
+    id3_length_t length;
+    enum id3_field_textencoding encoding;
+    id3_ucs4_t *string;
+
+    id = id3_field_getframeid(&frame->fields[0]);
+    assert(id);
+
+    if (strcmp(id, "TYER") != 0 && strcmp(id, "YTYE") != 0 &&
+	strcmp(id, "TDAT") != 0 && strcmp(id, "YTDA") != 0 &&
+	strcmp(id, "TIME") != 0 && strcmp(id, "YTIM") != 0)
+      continue;
+
+    data = id3_field_getbinarydata(&frame->fields[1], &length);
+    assert(data);
+
+    if (length < 1)
+      continue;
+
+    end = data + length;
+
+    encoding = id3_parse_uint(&data, 1);
+    string   = id3_parse_string(&data, end - data, encoding, 0);
+
+    if (id3_ucs4_length(string) < 4) {
+      free(string);
+      continue;
+    }
+
+    if (strcmp(id, "TYER") == 0 ||
+	strcmp(id, "YTYE") == 0) {
+      timestamp[0] = string[0];
+      timestamp[1] = string[1];
+      timestamp[2] = string[2];
+      timestamp[3] = string[3];
+    }
+    else if (strcmp(id, "TDAT") == 0 ||
+	     strcmp(id, "YTDA") == 0) {
+      timestamp[4] = '-';
+      timestamp[5] = string[2];
+      timestamp[6] = string[3];
+      timestamp[7] = '-';
+      timestamp[8] = string[0];
+      timestamp[9] = string[1];
+    }
+    else {  /* TIME or YTIM */
+      timestamp[10] = 'T';
+      timestamp[11] = string[0];
+      timestamp[12] = string[1];
+      timestamp[13] = ':';
+      timestamp[14] = string[2];
+      timestamp[15] = string[3];
+    }
+
+    free(string);
+  }
+
+  if (timestamp[0]) {
+    id3_ucs4_t *strings;
+
+    frame = id3_frame_new("TDRC");
+    if (frame == 0)
+      goto fail;
+
+    strings = timestamp;
+
+    if (id3_field_settextencoding(&frame->fields[0],
+				  ID3_FIELD_TEXTENCODING_ISO_8859_1) == -1 ||
+	id3_field_setstrings(&frame->fields[1], 1, &strings) == -1 ||
+	id3_tag_attachframe(tag, frame) == -1) {
+      id3_frame_delete(frame);
+      goto fail;
+    }
+  }
+
+  if (0) {
+  fail:
+    result = -1;
+  }
+
+  return result;
+}
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.gperf
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.gperf	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.gperf	(revision 5)
@@ -0,0 +1,301 @@
+%{
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: compat.gperf,v 1.11 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include <stdlib.h>
+# include <string.h>
+
+# ifdef HAVE_ASSERT_H
+#  include <assert.h>
+# endif
+
+# include "id3tag.h"
+# include "compat.h"
+# include "frame.h"
+# include "field.h"
+# include "parse.h"
+# include "ucs4.h"
+
+# define EQ(id)    #id, 0
+# define OBSOLETE    0, 0
+# define TX(id)    #id, translate_##id
+
+static id3_compat_func_t translate_TCON;
+%}
+struct id3_compat;
+%%
+#
+# ID3v2.2 and ID3v2.3 frames
+#
+# Only obsolete frames or frames with an equivalent ID3v2.4 frame ID are
+# listed here. If a frame ID is not listed, it is assumed that the same
+# frame ID is itself the equivalent ID3v2.4 frame ID.
+#
+# This list may also include frames with new content interpretations; the
+# translation function will rewrite the contents to comply with ID3v2.4.
+#
+BUF,  EQ(RBUF)  /* Recommended buffer size */
+CNT,  EQ(PCNT)  /* Play counter */
+COM,  EQ(COMM)  /* Comments */
+CRA,  EQ(AENC)  /* Audio encryption */
+CRM,  OBSOLETE  /* Encrypted meta frame [obsolete] */
+EQU,  OBSOLETE  /* Equalization [obsolete] */
+EQUA, OBSOLETE  /* Equalization [obsolete] */
+ETC,  EQ(ETCO)  /* Event timing codes */
+GEO,  EQ(GEOB)  /* General encapsulated object */
+IPL,  EQ(TIPL)  /* Involved people list */
+IPLS, EQ(TIPL)  /* Involved people list */
+LNK,  EQ(LINK)  /* Linked information */
+MCI,  EQ(MCDI)  /* Music CD identifier */
+MLL,  EQ(MLLT)  /* MPEG location lookup table */
+PIC,  EQ(APIC)  /* Attached picture */
+POP,  EQ(POPM)  /* Popularimeter */
+REV,  EQ(RVRB)  /* Reverb */
+RVA,  OBSOLETE  /* Relative volume adjustment [obsolete] */
+RVAD, OBSOLETE  /* Relative volume adjustment [obsolete] */
+SLT,  EQ(SYLT)  /* Synchronised lyric/text */
+STC,  EQ(SYTC)  /* Synchronised tempo codes */
+TAL,  EQ(TALB)  /* Album/movie/show title */
+TBP,  EQ(TBPM)  /* BPM (beats per minute) */
+TCM,  EQ(TCOM)  /* Composer */
+TCO,  TX(TCON)  /* Content type */
+TCON, TX(TCON)  /* Content type */
+TCR,  EQ(TCOP)  /* Copyright message */
+TDA,  OBSOLETE  /* Date [obsolete] */
+TDAT, OBSOLETE  /* Date [obsolete] */
+TDY,  EQ(TDLY)  /* Playlist delay */
+TEN,  EQ(TENC)  /* Encoded by */
+TFT,  EQ(TFLT)  /* File type */
+TIM,  OBSOLETE  /* Time [obsolete] */
+TIME, OBSOLETE  /* Time [obsolete] */
+TKE,  EQ(TKEY)  /* Initial key */
+TLA,  EQ(TLAN)  /* Language(s) */
+TLE,  EQ(TLEN)  /* Length */
+TMT,  EQ(TMED)  /* Media type */
+TOA,  EQ(TOPE)  /* Original artist(s)/performer(s) */
+TOF,  EQ(TOFN)  /* Original filename */
+TOL,  EQ(TOLY)  /* Original lyricist(s)/text writer(s) */
+TOR,  EQ(TDOR)  /* Original release year [obsolete] */
+TORY, EQ(TDOR)  /* Original release year [obsolete] */
+TOT,  EQ(TOAL)  /* Original album/movie/show title */
+TP1,  EQ(TPE1)  /* Lead performer(s)/soloist(s) */
+TP2,  EQ(TPE2)  /* Band/orchestra/accompaniment */
+TP3,  EQ(TPE3)  /* Conductor/performer refinement */
+TP4,  EQ(TPE4)  /* Interpreted, remixed, or otherwise modified by */
+TPA,  EQ(TPOS)  /* Part of a set */
+TPB,  EQ(TPUB)  /* Publisher */
+TRC,  EQ(TSRC)  /* ISRC (international standard recording code) */
+TRD,  OBSOLETE  /* Recording dates [obsolete] */
+TRDA, OBSOLETE  /* Recording dates [obsolete] */
+TRK,  EQ(TRCK)  /* Track number/position in set */
+TSI,  OBSOLETE  /* Size [obsolete] */
+TSIZ, OBSOLETE  /* Size [obsolete] */
+TSS,  EQ(TSSE)  /* Software/hardware and settings used for encoding */
+TT1,  EQ(TIT1)  /* Content group description */
+TT2,  EQ(TIT2)  /* Title/songname/content description */
+TT3,  EQ(TIT3)  /* Subtitle/description refinement */
+TXT,  EQ(TEXT)  /* Lyricist/text writer */
+TXX,  EQ(TXXX)  /* User defined text information frame */
+TYE,  OBSOLETE  /* Year [obsolete] */
+TYER, OBSOLETE  /* Year [obsolete] */
+UFI,  EQ(UFID)  /* Unique file identifier */
+ULT,  EQ(USLT)  /* Unsynchronised lyric/text transcription */
+WAF,  EQ(WOAF)  /* Official audio file webpage */
+WAR,  EQ(WOAR)  /* Official artist/performer webpage */
+WAS,  EQ(WOAS)  /* Official audio source webpage */
+WCM,  EQ(WCOM)  /* Commercial information */
+WCP,  EQ(WCOP)  /* Copyright/legal information */
+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,
+		   id3_byte_t const *data, id3_length_t length)
+{
+  id3_byte_t const *end;
+  enum id3_field_textencoding encoding;
+  id3_ucs4_t *string = 0, *ptr, *endptr;
+  int result = 0;
+
+  /* translate old TCON syntax into multiple strings */
+
+  assert(frame->nfields == 2);
+
+  encoding = ID3_FIELD_TEXTENCODING_ISO_8859_1;
+
+  end = data + length;
+
+  if (id3_field_parse(&frame->fields[0], &data, end - data, &encoding) == -1)
+    goto fail;
+
+  string = id3_parse_string(&data, end - data, encoding, 0);
+  if (string == 0)
+    goto fail;
+
+  ptr = string;
+  while (*ptr == '(') {
+    if (*++ptr == '(')
+      break;
+
+    endptr = ptr;
+    while (*endptr && *endptr != ')')
+      ++endptr;
+
+    if (*endptr)
+      *endptr++ = 0;
+
+    if (id3_field_addstring(&frame->fields[1], ptr) == -1)
+      goto fail;
+
+    ptr = endptr;
+  }
+
+  if (*ptr && id3_field_addstring(&frame->fields[1], ptr) == -1)
+    goto fail;
+
+  if (0) {
+  fail:
+    result = -1;
+  }
+
+  if (string)
+    free(string);
+
+  return result;
+}
+
+/*
+ * NAME:	compat->fixup()
+ * DESCRIPTION:	finish compatibility translations
+ */
+int id3_compat_fixup(struct id3_tag *tag)
+{
+  struct id3_frame *frame;
+  unsigned int index;
+  id3_ucs4_t timestamp[17] = { 0 };
+  int result = 0;
+
+  /* create a TDRC frame from obsolete TYER/TDAT/TIME frames */
+
+  /*
+   * TYE/TYER: YYYY
+   * TDA/TDAT: DDMM
+   * TIM/TIME: HHMM
+   *
+   * TDRC: yyyy-MM-ddTHH:mm
+   */
+
+  index = 0;
+  while ((frame = id3_tag_findframe(tag, ID3_FRAME_OBSOLETE, index++))) {
+    char const *id;
+    id3_byte_t const *data, *end;
+    id3_length_t length;
+    enum id3_field_textencoding encoding;
+    id3_ucs4_t *string;
+
+    id = id3_field_getframeid(&frame->fields[0]);
+    assert(id);
+
+    if (strcmp(id, "TYER") != 0 && strcmp(id, "YTYE") != 0 &&
+	strcmp(id, "TDAT") != 0 && strcmp(id, "YTDA") != 0 &&
+	strcmp(id, "TIME") != 0 && strcmp(id, "YTIM") != 0)
+      continue;
+
+    data = id3_field_getbinarydata(&frame->fields[1], &length);
+    assert(data);
+
+    if (length < 1)
+      continue;
+
+    end = data + length;
+
+    encoding = id3_parse_uint(&data, 1);
+    string   = id3_parse_string(&data, end - data, encoding, 0);
+    if (!string)
+    {
+      continue;
+    }
+
+    if (id3_ucs4_length(string) < 4) {
+      free(string);
+      continue;
+    }
+
+    if (strcmp(id, "TYER") == 0 ||
+	strcmp(id, "YTYE") == 0) {
+      timestamp[0] = string[0];
+      timestamp[1] = string[1];
+      timestamp[2] = string[2];
+      timestamp[3] = string[3];
+    }
+    else if (strcmp(id, "TDAT") == 0 ||
+	     strcmp(id, "YTDA") == 0) {
+      timestamp[4] = '-';
+      timestamp[5] = string[2];
+      timestamp[6] = string[3];
+      timestamp[7] = '-';
+      timestamp[8] = string[0];
+      timestamp[9] = string[1];
+    }
+    else {  /* TIME or YTIM */
+      timestamp[10] = 'T';
+      timestamp[11] = string[0];
+      timestamp[12] = string[1];
+      timestamp[13] = ':';
+      timestamp[14] = string[2];
+      timestamp[15] = string[3];
+    }
+
+    free(string);
+  }
+
+  if (timestamp[0]) {
+    id3_ucs4_t *strings;
+
+    frame = id3_frame_new("TDRC");
+    if (frame == 0)
+      goto fail;
+
+    strings = timestamp;
+
+    if (id3_field_settextencoding(&frame->fields[0],
+				  ID3_FIELD_TEXTENCODING_ISO_8859_1) == -1 ||
+	id3_field_setstrings(&frame->fields[1], 1, &strings) == -1 ||
+	id3_tag_attachframe(tag, frame) == -1) {
+      id3_frame_delete(frame);
+      goto fail;
+    }
+  }
+
+  if (0) {
+  fail:
+    result = -1;
+  }
+
+  return result;
+}
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.h
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.h	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/compat.h	(revision 5)
@@ -0,0 +1,41 @@
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: compat.h,v 1.8 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifndef LIBID3TAG_COMPAT_H
+# define LIBID3TAG_COMPAT_H
+
+# include "id3tag.h"
+
+typedef int id3_compat_func_t(struct id3_frame *, char const *,
+			      id3_byte_t const *, id3_length_t);
+
+struct id3_compat {
+  char const *id;
+  char const *equiv;
+  id3_compat_func_t *translate;
+};
+
+struct id3_compat const *id3_compat_lookup(register char const *,
+					   register size_t);
+
+int id3_compat_fixup(struct id3_tag *);
+
+# endif
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat	(revision 5)
@@ -0,0 +1,480 @@
+/* Automatically generated from genre.dat.in */
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Id: genre.dat.in,v 1.7 2004/01/23 09:41:32 rob Exp 
+ */
+
+/*
+ * These are the ID3 genre names, taken as a combination of names from ID3v1
+ * (listed in Appendix A of the ID3 tag version 2.4.0 informal standard) and
+ * the extensions made by Winamp as of version 2.80.
+ */
+
+/* ID3v1 names (0-79) */
+
+static id3_ucs4_t const genre_BLUES[] =
+  { 'B', 'l', 'u', 'e', 's', 0 };
+static id3_ucs4_t const genre_CLASSIC_ROCK[] =
+  { 'C', 'l', 'a', 's', 's', 'i', 'c', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_COUNTRY[] =
+  { 'C', 'o', 'u', 'n', 't', 'r', 'y', 0 };
+static id3_ucs4_t const genre_DANCE[] =
+  { 'D', 'a', 'n', 'c', 'e', 0 };
+static id3_ucs4_t const genre_DISCO[] =
+  { 'D', 'i', 's', 'c', 'o', 0 };
+static id3_ucs4_t const genre_FUNK[] =
+  { 'F', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_GRUNGE[] =
+  { 'G', 'r', 'u', 'n', 'g', 'e', 0 };
+static id3_ucs4_t const genre_HIP_HOP[] =
+  { 'H', 'i', 'p', '-', 'H', 'o', 'p', 0 };
+static id3_ucs4_t const genre_JAZZ[] =
+  { 'J', 'a', 'z', 'z', 0 };
+static id3_ucs4_t const genre_METAL[] =
+  { 'M', 'e', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_NEW_AGE[] =
+  { 'N', 'e', 'w', ' ', 'A', 'g', 'e', 0 };
+static id3_ucs4_t const genre_OLDIES[] =
+  { 'O', 'l', 'd', 'i', 'e', 's', 0 };
+static id3_ucs4_t const genre_OTHER[] =
+  { 'O', 't', 'h', 'e', 'r', 0 };
+static id3_ucs4_t const genre_POP[] =
+  { 'P', 'o', 'p', 0 };
+static id3_ucs4_t const genre_R_B[] =
+  { 'R', '&', 'B', 0 };
+static id3_ucs4_t const genre_RAP[] =
+  { 'R', 'a', 'p', 0 };
+static id3_ucs4_t const genre_REGGAE[] =
+  { 'R', 'e', 'g', 'g', 'a', 'e', 0 };
+static id3_ucs4_t const genre_ROCK[] =
+  { 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_TECHNO[] =
+  { 'T', 'e', 'c', 'h', 'n', 'o', 0 };
+static id3_ucs4_t const genre_INDUSTRIAL[] =
+  { 'I', 'n', 'd', 'u', 's', 't', 'r', 'i', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ALTERNATIVE[] =
+  { 'A', 'l', 't', 'e', 'r', 'n', 'a', 't', 'i', 'v', 'e', 0 };
+static id3_ucs4_t const genre_SKA[] =
+  { 'S', 'k', 'a', 0 };
+static id3_ucs4_t const genre_DEATH_METAL[] =
+  { 'D', 'e', 'a', 't', 'h', ' ', 'M', 'e', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_PRANKS[] =
+  { 'P', 'r', 'a', 'n', 'k', 's', 0 };
+static id3_ucs4_t const genre_SOUNDTRACK[] =
+  { 'S', 'o', 'u', 'n', 'd', 't', 'r', 'a', 'c', 'k', 0 };
+static id3_ucs4_t const genre_EURO_TECHNO[] =
+  { 'E', 'u', 'r', 'o', '-', 'T', 'e', 'c', 'h', 'n', 'o', 0 };
+static id3_ucs4_t const genre_AMBIENT[] =
+  { 'A', 'm', 'b', 'i', 'e', 'n', 't', 0 };
+static id3_ucs4_t const genre_TRIP_HOP[] =
+  { 'T', 'r', 'i', 'p', '-', 'H', 'o', 'p', 0 };
+static id3_ucs4_t const genre_VOCAL[] =
+  { 'V', 'o', 'c', 'a', 'l', 0 };
+static id3_ucs4_t const genre_JAZZ_FUNK[] =
+  { 'J', 'a', 'z', 'z', '+', 'F', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_FUSION[] =
+  { 'F', 'u', 's', 'i', 'o', 'n', 0 };
+static id3_ucs4_t const genre_TRANCE[] =
+  { 'T', 'r', 'a', 'n', 'c', 'e', 0 };
+static id3_ucs4_t const genre_CLASSICAL[] =
+  { 'C', 'l', 'a', 's', 's', 'i', 'c', 'a', 'l', 0 };
+static id3_ucs4_t const genre_INSTRUMENTAL[] =
+  { 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ACID[] =
+  { 'A', 'c', 'i', 'd', 0 };
+static id3_ucs4_t const genre_HOUSE[] =
+  { 'H', 'o', 'u', 's', 'e', 0 };
+static id3_ucs4_t const genre_GAME[] =
+  { 'G', 'a', 'm', 'e', 0 };
+static id3_ucs4_t const genre_SOUND_CLIP[] =
+  { 'S', 'o', 'u', 'n', 'd', ' ', 'C', 'l', 'i', 'p', 0 };
+static id3_ucs4_t const genre_GOSPEL[] =
+  { 'G', 'o', 's', 'p', 'e', 'l', 0 };
+static id3_ucs4_t const genre_NOISE[] =
+  { 'N', 'o', 'i', 's', 'e', 0 };
+static id3_ucs4_t const genre_ALTERNROCK[] =
+  { 'A', 'l', 't', 'e', 'r', 'n', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_BASS[] =
+  { 'B', 'a', 's', 's', 0 };
+static id3_ucs4_t const genre_SOUL[] =
+  { 'S', 'o', 'u', 'l', 0 };
+static id3_ucs4_t const genre_PUNK[] =
+  { 'P', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_SPACE[] =
+  { 'S', 'p', 'a', 'c', 'e', 0 };
+static id3_ucs4_t const genre_MEDITATIVE[] =
+  { 'M', 'e', 'd', 'i', 't', 'a', 't', 'i', 'v', 'e', 0 };
+static id3_ucs4_t const genre_INSTRUMENTAL_POP[] =
+  { 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 'a', 'l', ' ', 'P', 'o', 'p', 0 };
+static id3_ucs4_t const genre_INSTRUMENTAL_ROCK[] =
+  { 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 'a', 'l', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_ETHNIC[] =
+  { 'E', 't', 'h', 'n', 'i', 'c', 0 };
+static id3_ucs4_t const genre_GOTHIC[] =
+  { 'G', 'o', 't', 'h', 'i', 'c', 0 };
+static id3_ucs4_t const genre_DARKWAVE[] =
+  { 'D', 'a', 'r', 'k', 'w', 'a', 'v', 'e', 0 };
+static id3_ucs4_t const genre_TECHNO_INDUSTRIAL[] =
+  { 'T', 'e', 'c', 'h', 'n', 'o', '-', 'I', 'n', 'd', 'u', 's', 't', 'r', 'i', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ELECTRONIC[] =
+  { 'E', 'l', 'e', 'c', 't', 'r', 'o', 'n', 'i', 'c', 0 };
+static id3_ucs4_t const genre_POP_FOLK[] =
+  { 'P', 'o', 'p', '-', 'F', 'o', 'l', 'k', 0 };
+static id3_ucs4_t const genre_EURODANCE[] =
+  { 'E', 'u', 'r', 'o', 'd', 'a', 'n', 'c', 'e', 0 };
+static id3_ucs4_t const genre_DREAM[] =
+  { 'D', 'r', 'e', 'a', 'm', 0 };
+static id3_ucs4_t const genre_SOUTHERN_ROCK[] =
+  { 'S', 'o', 'u', 't', 'h', 'e', 'r', 'n', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_COMEDY[] =
+  { 'C', 'o', 'm', 'e', 'd', 'y', 0 };
+static id3_ucs4_t const genre_CULT[] =
+  { 'C', 'u', 'l', 't', 0 };
+static id3_ucs4_t const genre_GANGSTA[] =
+  { 'G', 'a', 'n', 'g', 's', 't', 'a', 0 };
+static id3_ucs4_t const genre_TOP_40[] =
+  { 'T', 'o', 'p', ' ', '4', '0', 0 };
+static id3_ucs4_t const genre_CHRISTIAN_RAP[] =
+  { 'C', 'h', 'r', 'i', 's', 't', 'i', 'a', 'n', ' ', 'R', 'a', 'p', 0 };
+static id3_ucs4_t const genre_POP_FUNK[] =
+  { 'P', 'o', 'p', '/', 'F', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_JUNGLE[] =
+  { 'J', 'u', 'n', 'g', 'l', 'e', 0 };
+static id3_ucs4_t const genre_NATIVE_AMERICAN[] =
+  { 'N', 'a', 't', 'i', 'v', 'e', ' ', 'A', 'm', 'e', 'r', 'i', 'c', 'a', 'n', 0 };
+static id3_ucs4_t const genre_CABARET[] =
+  { 'C', 'a', 'b', 'a', 'r', 'e', 't', 0 };
+static id3_ucs4_t const genre_NEW_WAVE[] =
+  { 'N', 'e', 'w', ' ', 'W', 'a', 'v', 'e', 0 };
+static id3_ucs4_t const genre_PSYCHEDELIC[] =
+  { 'P', 's', 'y', 'c', 'h', 'e', 'd', 'e', 'l', 'i', 'c', 0 };
+static id3_ucs4_t const genre_RAVE[] =
+  { 'R', 'a', 'v', 'e', 0 };
+static id3_ucs4_t const genre_SHOWTUNES[] =
+  { 'S', 'h', 'o', 'w', 't', 'u', 'n', 'e', 's', 0 };
+static id3_ucs4_t const genre_TRAILER[] =
+  { 'T', 'r', 'a', 'i', 'l', 'e', 'r', 0 };
+static id3_ucs4_t const genre_LO_FI[] =
+  { 'L', 'o', '-', 'F', 'i', 0 };
+static id3_ucs4_t const genre_TRIBAL[] =
+  { 'T', 'r', 'i', 'b', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ACID_PUNK[] =
+  { 'A', 'c', 'i', 'd', ' ', 'P', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_ACID_JAZZ[] =
+  { 'A', 'c', 'i', 'd', ' ', 'J', 'a', 'z', 'z', 0 };
+static id3_ucs4_t const genre_POLKA[] =
+  { 'P', 'o', 'l', 'k', 'a', 0 };
+static id3_ucs4_t const genre_RETRO[] =
+  { 'R', 'e', 't', 'r', 'o', 0 };
+static id3_ucs4_t const genre_MUSICAL[] =
+  { 'M', 'u', 's', 'i', 'c', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ROCK___ROLL[] =
+  { 'R', 'o', 'c', 'k', ' ', '&', ' ', 'R', 'o', 'l', 'l', 0 };
+static id3_ucs4_t const genre_HARD_ROCK[] =
+  { 'H', 'a', 'r', 'd', ' ', 'R', 'o', 'c', 'k', 0 };
+
+/* Winamp extensions (80-147) */
+
+static id3_ucs4_t const genre_FOLK[] =
+  { 'F', 'o', 'l', 'k', 0 };
+static id3_ucs4_t const genre_FOLK_ROCK[] =
+  { 'F', 'o', 'l', 'k', '/', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_NATIONAL_FOLK[] =
+  { 'N', 'a', 't', 'i', 'o', 'n', 'a', 'l', ' ', 'F', 'o', 'l', 'k', 0 };
+static id3_ucs4_t const genre_SWING[] =
+  { 'S', 'w', 'i', 'n', 'g', 0 };
+static id3_ucs4_t const genre_FAST_FUSION[] =
+  { 'F', 'a', 's', 't', '-', 'F', 'u', 's', 'i', 'o', 'n', 0 };
+static id3_ucs4_t const genre_BEBOB[] =
+  { 'B', 'e', 'b', 'o', 'b', 0 };
+static id3_ucs4_t const genre_LATIN[] =
+  { 'L', 'a', 't', 'i', 'n', 0 };
+static id3_ucs4_t const genre_REVIVAL[] =
+  { 'R', 'e', 'v', 'i', 'v', 'a', 'l', 0 };
+static id3_ucs4_t const genre_CELTIC[] =
+  { 'C', 'e', 'l', 't', 'i', 'c', 0 };
+static id3_ucs4_t const genre_BLUEGRASS[] =
+  { 'B', 'l', 'u', 'e', 'g', 'r', 'a', 's', 's', 0 };
+static id3_ucs4_t const genre_AVANTGARDE[] =
+  { 'A', 'v', 'a', 'n', 't', 'g', 'a', 'r', 'd', 'e', 0 };
+static id3_ucs4_t const genre_GOTHIC_ROCK[] =
+  { 'G', 'o', 't', 'h', 'i', 'c', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_PROGRESSIVE_ROCK[] =
+  { 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', 'i', 'v', 'e', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_PSYCHEDELIC_ROCK[] =
+  { 'P', 's', 'y', 'c', 'h', 'e', 'd', 'e', 'l', 'i', 'c', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_SYMPHONIC_ROCK[] =
+  { 'S', 'y', 'm', 'p', 'h', 'o', 'n', 'i', 'c', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_SLOW_ROCK[] =
+  { 'S', 'l', 'o', 'w', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_BIG_BAND[] =
+  { 'B', 'i', 'g', ' ', 'B', 'a', 'n', 'd', 0 };
+static id3_ucs4_t const genre_CHORUS[] =
+  { 'C', 'h', 'o', 'r', 'u', 's', 0 };
+static id3_ucs4_t const genre_EASY_LISTENING[] =
+  { 'E', 'a', 's', 'y', ' ', 'L', 'i', 's', 't', 'e', 'n', 'i', 'n', 'g', 0 };
+static id3_ucs4_t const genre_ACOUSTIC[] =
+  { 'A', 'c', 'o', 'u', 's', 't', 'i', 'c', 0 };
+static id3_ucs4_t const genre_HUMOUR[] =
+  { 'H', 'u', 'm', 'o', 'u', 'r', 0 };
+static id3_ucs4_t const genre_SPEECH[] =
+  { 'S', 'p', 'e', 'e', 'c', 'h', 0 };
+static id3_ucs4_t const genre_CHANSON[] =
+  { 'C', 'h', 'a', 'n', 's', 'o', 'n', 0 };
+static id3_ucs4_t const genre_OPERA[] =
+  { 'O', 'p', 'e', 'r', 'a', 0 };
+static id3_ucs4_t const genre_CHAMBER_MUSIC[] =
+  { 'C', 'h', 'a', 'm', 'b', 'e', 'r', ' ', 'M', 'u', 's', 'i', 'c', 0 };
+static id3_ucs4_t const genre_SONATA[] =
+  { 'S', 'o', 'n', 'a', 't', 'a', 0 };
+static id3_ucs4_t const genre_SYMPHONY[] =
+  { 'S', 'y', 'm', 'p', 'h', 'o', 'n', 'y', 0 };
+static id3_ucs4_t const genre_BOOTY_BASS[] =
+  { 'B', 'o', 'o', 't', 'y', ' ', 'B', 'a', 's', 's', 0 };
+static id3_ucs4_t const genre_PRIMUS[] =
+  { 'P', 'r', 'i', 'm', 'u', 's', 0 };
+static id3_ucs4_t const genre_PORN_GROOVE[] =
+  { 'P', 'o', 'r', 'n', ' ', 'G', 'r', 'o', 'o', 'v', 'e', 0 };
+static id3_ucs4_t const genre_SATIRE[] =
+  { 'S', 'a', 't', 'i', 'r', 'e', 0 };
+static id3_ucs4_t const genre_SLOW_JAM[] =
+  { 'S', 'l', 'o', 'w', ' ', 'J', 'a', 'm', 0 };
+static id3_ucs4_t const genre_CLUB[] =
+  { 'C', 'l', 'u', 'b', 0 };
+static id3_ucs4_t const genre_TANGO[] =
+  { 'T', 'a', 'n', 'g', 'o', 0 };
+static id3_ucs4_t const genre_SAMBA[] =
+  { 'S', 'a', 'm', 'b', 'a', 0 };
+static id3_ucs4_t const genre_FOLKLORE[] =
+  { 'F', 'o', 'l', 'k', 'l', 'o', 'r', 'e', 0 };
+static id3_ucs4_t const genre_BALLAD[] =
+  { 'B', 'a', 'l', 'l', 'a', 'd', 0 };
+static id3_ucs4_t const genre_POWER_BALLAD[] =
+  { 'P', 'o', 'w', 'e', 'r', ' ', 'B', 'a', 'l', 'l', 'a', 'd', 0 };
+static id3_ucs4_t const genre_RHYTHMIC_SOUL[] =
+  { 'R', 'h', 'y', 't', 'h', 'm', 'i', 'c', ' ', 'S', 'o', 'u', 'l', 0 };
+static id3_ucs4_t const genre_FREESTYLE[] =
+  { 'F', 'r', 'e', 'e', 's', 't', 'y', 'l', 'e', 0 };
+static id3_ucs4_t const genre_DUET[] =
+  { 'D', 'u', 'e', 't', 0 };
+static id3_ucs4_t const genre_PUNK_ROCK[] =
+  { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_DRUM_SOLO[] =
+  { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 };
+static id3_ucs4_t const genre_A_CAPELLA[] =
+  { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 };
+static id3_ucs4_t const genre_EURO_HOUSE[] =
+  { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 };
+static id3_ucs4_t const genre_DANCE_HALL[] =
+  { 'D', 'a', 'n', 'c', 'e', ' ', 'H', 'a', 'l', 'l', 0 };
+static id3_ucs4_t const genre_GOA[] =
+  { 'G', 'o', 'a', 0 };
+static id3_ucs4_t const genre_DRUM___BASS[] =
+  { 'D', 'r', 'u', 'm', ' ', '&', ' ', 'B', 'a', 's', 's', 0 };
+static id3_ucs4_t const genre_CLUB_HOUSE[] =
+  { 'C', 'l', 'u', 'b', '-', 'H', 'o', 'u', 's', 'e', 0 };
+static id3_ucs4_t const genre_HARDCORE[] =
+  { 'H', 'a', 'r', 'd', 'c', 'o', 'r', 'e', 0 };
+static id3_ucs4_t const genre_TERROR[] =
+  { 'T', 'e', 'r', 'r', 'o', 'r', 0 };
+static id3_ucs4_t const genre_INDIE[] =
+  { 'I', 'n', 'd', 'i', 'e', 0 };
+static id3_ucs4_t const genre_BRITPOP[] =
+  { 'B', 'r', 'i', 't', 'P', 'o', 'p', 0 };
+static id3_ucs4_t const genre_NEGERPUNK[] =
+  { 'N', 'e', 'g', 'e', 'r', 'p', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_POLSK_PUNK[] =
+  { 'P', 'o', 'l', 's', 'k', ' ', 'P', 'u', 'n', 'k', 0 };
+static id3_ucs4_t const genre_BEAT[] =
+  { 'B', 'e', 'a', 't', 0 };
+static id3_ucs4_t const genre_CHRISTIAN_GANGSTA_RAP[] =
+  { 'C', 'h', 'r', 'i', 's', 't', 'i', 'a', 'n', ' ', 'G', 'a', 'n', 'g', 's', 't', 'a', ' ', 'R', 'a', 'p', 0 };
+static id3_ucs4_t const genre_HEAVY_METAL[] =
+  { 'H', 'e', 'a', 'v', 'y', ' ', 'M', 'e', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_BLACK_METAL[] =
+  { 'B', 'l', 'a', 'c', 'k', ' ', 'M', 'e', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_CROSSOVER[] =
+  { 'C', 'r', 'o', 's', 's', 'o', 'v', 'e', 'r', 0 };
+static id3_ucs4_t const genre_CONTEMPORARY_CHRISTIAN[] =
+  { 'C', 'o', 'n', 't', 'e', 'm', 'p', 'o', 'r', 'a', 'r', 'y', ' ', 'C', 'h', 'r', 'i', 's', 't', 'i', 'a', 'n', 0 };
+static id3_ucs4_t const genre_CHRISTIAN_ROCK[] =
+  { 'C', 'h', 'r', 'i', 's', 't', 'i', 'a', 'n', ' ', 'R', 'o', 'c', 'k', 0 };
+static id3_ucs4_t const genre_MERENGUE[] =
+  { 'M', 'e', 'r', 'e', 'n', 'g', 'u', 'e', 0 };
+static id3_ucs4_t const genre_SALSA[] =
+  { 'S', 'a', 'l', 's', 'a', 0 };
+static id3_ucs4_t const genre_THRASH_METAL[] =
+  { 'T', 'h', 'r', 'a', 's', 'h', ' ', 'M', 'e', 't', 'a', 'l', 0 };
+static id3_ucs4_t const genre_ANIME[] =
+  { 'A', 'n', 'i', 'm', 'e', 0 };
+static id3_ucs4_t const genre_JPOP[] =
+  { 'J', 'P', 'o', 'p', 0 };
+static id3_ucs4_t const genre_SYNTHPOP[] =
+  { 'S', 'y', 'n', 't', 'h', 'p', 'o', 'p', 0 };
+
+static id3_ucs4_t const *const genre_table[] = {
+  genre_BLUES,
+  genre_CLASSIC_ROCK,
+  genre_COUNTRY,
+  genre_DANCE,
+  genre_DISCO,
+  genre_FUNK,
+  genre_GRUNGE,
+  genre_HIP_HOP,
+  genre_JAZZ,
+  genre_METAL,
+  genre_NEW_AGE,
+  genre_OLDIES,
+  genre_OTHER,
+  genre_POP,
+  genre_R_B,
+  genre_RAP,
+  genre_REGGAE,
+  genre_ROCK,
+  genre_TECHNO,
+  genre_INDUSTRIAL,
+  genre_ALTERNATIVE,
+  genre_SKA,
+  genre_DEATH_METAL,
+  genre_PRANKS,
+  genre_SOUNDTRACK,
+  genre_EURO_TECHNO,
+  genre_AMBIENT,
+  genre_TRIP_HOP,
+  genre_VOCAL,
+  genre_JAZZ_FUNK,
+  genre_FUSION,
+  genre_TRANCE,
+  genre_CLASSICAL,
+  genre_INSTRUMENTAL,
+  genre_ACID,
+  genre_HOUSE,
+  genre_GAME,
+  genre_SOUND_CLIP,
+  genre_GOSPEL,
+  genre_NOISE,
+  genre_ALTERNROCK,
+  genre_BASS,
+  genre_SOUL,
+  genre_PUNK,
+  genre_SPACE,
+  genre_MEDITATIVE,
+  genre_INSTRUMENTAL_POP,
+  genre_INSTRUMENTAL_ROCK,
+  genre_ETHNIC,
+  genre_GOTHIC,
+  genre_DARKWAVE,
+  genre_TECHNO_INDUSTRIAL,
+  genre_ELECTRONIC,
+  genre_POP_FOLK,
+  genre_EURODANCE,
+  genre_DREAM,
+  genre_SOUTHERN_ROCK,
+  genre_COMEDY,
+  genre_CULT,
+  genre_GANGSTA,
+  genre_TOP_40,
+  genre_CHRISTIAN_RAP,
+  genre_POP_FUNK,
+  genre_JUNGLE,
+  genre_NATIVE_AMERICAN,
+  genre_CABARET,
+  genre_NEW_WAVE,
+  genre_PSYCHEDELIC,
+  genre_RAVE,
+  genre_SHOWTUNES,
+  genre_TRAILER,
+  genre_LO_FI,
+  genre_TRIBAL,
+  genre_ACID_PUNK,
+  genre_ACID_JAZZ,
+  genre_POLKA,
+  genre_RETRO,
+  genre_MUSICAL,
+  genre_ROCK___ROLL,
+  genre_HARD_ROCK,
+  genre_FOLK,
+  genre_FOLK_ROCK,
+  genre_NATIONAL_FOLK,
+  genre_SWING,
+  genre_FAST_FUSION,
+  genre_BEBOB,
+  genre_LATIN,
+  genre_REVIVAL,
+  genre_CELTIC,
+  genre_BLUEGRASS,
+  genre_AVANTGARDE,
+  genre_GOTHIC_ROCK,
+  genre_PROGRESSIVE_ROCK,
+  genre_PSYCHEDELIC_ROCK,
+  genre_SYMPHONIC_ROCK,
+  genre_SLOW_ROCK,
+  genre_BIG_BAND,
+  genre_CHORUS,
+  genre_EASY_LISTENING,
+  genre_ACOUSTIC,
+  genre_HUMOUR,
+  genre_SPEECH,
+  genre_CHANSON,
+  genre_OPERA,
+  genre_CHAMBER_MUSIC,
+  genre_SONATA,
+  genre_SYMPHONY,
+  genre_BOOTY_BASS,
+  genre_PRIMUS,
+  genre_PORN_GROOVE,
+  genre_SATIRE,
+  genre_SLOW_JAM,
+  genre_CLUB,
+  genre_TANGO,
+  genre_SAMBA,
+  genre_FOLKLORE,
+  genre_BALLAD,
+  genre_POWER_BALLAD,
+  genre_RHYTHMIC_SOUL,
+  genre_FREESTYLE,
+  genre_DUET,
+  genre_PUNK_ROCK,
+  genre_DRUM_SOLO,
+  genre_A_CAPELLA,
+  genre_EURO_HOUSE,
+  genre_DANCE_HALL,
+  genre_GOA,
+  genre_DRUM___BASS,
+  genre_CLUB_HOUSE,
+  genre_HARDCORE,
+  genre_TERROR,
+  genre_INDIE,
+  genre_BRITPOP,
+  genre_NEGERPUNK,
+  genre_POLSK_PUNK,
+  genre_BEAT,
+  genre_CHRISTIAN_GANGSTA_RAP,
+  genre_HEAVY_METAL,
+  genre_BLACK_METAL,
+  genre_CROSSOVER,
+  genre_CONTEMPORARY_CHRISTIAN,
+  genre_CHRISTIAN_ROCK,
+  genre_MERENGUE,
+  genre_SALSA,
+  genre_THRASH_METAL,
+  genre_ANIME,
+  genre_JPOP,
+  genre_SYNTHPOP
+};
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat.in
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat.in	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/genre.dat.in	(revision 5)
@@ -0,0 +1,180 @@
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: genre.dat.in,v 1.7 2004/01/23 09:41:32 rob Exp $
+ */
+
+/*
+ * These are the ID3 genre names, taken as a combination of names from ID3v1
+ * (listed in Appendix A of the ID3 tag version 2.4.0 informal standard) and
+ * the extensions made by Winamp as of version 2.80.
+ */
+
+/* ID3v1 names (0-79) */
+
+Blues
+Classic Rock
+Country
+Dance
+Disco
+Funk
+Grunge
+Hip-Hop
+Jazz
+Metal
+New Age
+Oldies
+Other
+Pop
+R&B
+Rap
+Reggae
+Rock
+Techno
+Industrial
+Alternative
+Ska
+Death Metal
+Pranks
+Soundtrack
+Euro-Techno
+Ambient
+Trip-Hop
+Vocal
+Jazz+Funk
+Fusion
+Trance
+Classical
+Instrumental
+Acid
+House
+Game
+Sound Clip
+Gospel
+Noise
+AlternRock
+Bass
+Soul
+Punk
+Space
+Meditative
+Instrumental Pop
+Instrumental Rock
+Ethnic
+Gothic
+Darkwave
+Techno-Industrial
+Electronic
+Pop-Folk
+Eurodance
+Dream
+Southern Rock
+Comedy
+Cult
+Gangsta
+Top 40
+Christian Rap
+Pop/Funk
+Jungle
+Native American
+Cabaret
+New Wave
+Psychedelic
+Rave
+Showtunes
+Trailer
+Lo-Fi
+Tribal
+Acid Punk
+Acid Jazz
+Polka
+Retro
+Musical
+Rock & Roll
+Hard Rock
+
+/* Winamp extensions (80-147) */
+
+Folk
+Folk/Rock
+National Folk
+Swing
+Fast-Fusion
+Bebob
+Latin
+Revival
+Celtic
+Bluegrass
+Avantgarde
+Gothic Rock
+Progressive Rock
+Psychedelic Rock
+Symphonic Rock
+Slow Rock
+Big Band
+Chorus
+Easy Listening
+Acoustic
+Humour
+Speech
+Chanson
+Opera
+Chamber Music
+Sonata
+Symphony
+Booty Bass
+Primus
+Porn Groove
+Satire
+Slow Jam
+Club
+Tango
+Samba
+Folklore
+Ballad
+Power Ballad
+Rhythmic Soul
+Freestyle
+Duet
+Punk Rock
+Drum Solo
+A Capella
+Euro-House
+Dance Hall
+Goa
+Drum & Bass
+Club-House
+Hardcore
+Terror
+Indie
+BritPop
+Negerpunk
+Polsk Punk
+Beat
+Christian Gangsta Rap
+Heavy Metal
+Black Metal
+Crossover
+Contemporary Christian
+Christian Rock
+Merengue
+Salsa
+Thrash Metal
+Anime
+JPop
+Synthpop
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/parse.c
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/parse.c	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/parse.c	(revision 5)
@@ -0,0 +1,199 @@
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: parse.c,v 1.9 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# ifdef HAVE_ASSERT_H
+#  include <assert.h>
+# endif
+
+# include <stdlib.h>
+# include <string.h>
+
+# include "id3tag.h"
+# include "parse.h"
+# include "latin1.h"
+# include "utf16.h"
+# include "utf8.h"
+
+signed long id3_parse_int(id3_byte_t const **ptr, unsigned int bytes)
+{
+  signed long value = 0;
+
+  assert(bytes >= 1 && bytes <= 4);
+
+  if (**ptr & 0x80)
+    value = ~0;
+
+  switch (bytes) {
+  case 4: value = (value << 8) | *(*ptr)++;
+  case 3: value = (value << 8) | *(*ptr)++;
+  case 2: value = (value << 8) | *(*ptr)++;
+  case 1: value = (value << 8) | *(*ptr)++;
+  }
+
+  return value;
+}
+
+unsigned long id3_parse_uint(id3_byte_t const **ptr, unsigned int bytes)
+{
+  unsigned long value = 0;
+
+  assert(bytes >= 1 && bytes <= 4);
+
+  switch (bytes) {
+  case 4: value = (value << 8) | *(*ptr)++;
+  case 3: value = (value << 8) | *(*ptr)++;
+  case 2: value = (value << 8) | *(*ptr)++;
+  case 1: value = (value << 8) | *(*ptr)++;
+  }
+
+  return value;
+}
+
+unsigned long id3_parse_syncsafe(id3_byte_t const **ptr, unsigned int bytes)
+{
+  unsigned long value = 0;
+
+  assert(bytes == 4 || bytes == 5);
+
+  switch (bytes) {
+  case 5: value = (value << 4) | (*(*ptr)++ & 0x0f);
+  case 4: value = (value << 7) | (*(*ptr)++ & 0x7f);
+          value = (value << 7) | (*(*ptr)++ & 0x7f);
+	  value = (value << 7) | (*(*ptr)++ & 0x7f);
+	  value = (value << 7) | (*(*ptr)++ & 0x7f);
+  }
+
+  return value;
+}
+
+void id3_parse_immediate(id3_byte_t const **ptr, unsigned int bytes,
+			 char *value)
+{
+  assert(value);
+  assert(bytes == 8 || bytes == 4 || bytes == 3);
+
+  switch (bytes) {
+  case 8: *value++ = *(*ptr)++;
+          *value++ = *(*ptr)++;
+	  *value++ = *(*ptr)++;
+	  *value++ = *(*ptr)++;
+  case 4: *value++ = *(*ptr)++;
+  case 3: *value++ = *(*ptr)++;
+          *value++ = *(*ptr)++;
+	  *value++ = *(*ptr)++;
+  }
+
+  *value = 0;
+}
+
+id3_latin1_t *id3_parse_latin1(id3_byte_t const **ptr, id3_length_t length,
+			       int full)
+{
+  id3_byte_t const *end;
+  int terminated = 0;
+  id3_latin1_t *latin1;
+
+  end = memchr(*ptr, 0, length);
+  if (end == 0)
+    end = *ptr + length;
+  else {
+    length = end - *ptr;
+    terminated = 1;
+  }
+
+  latin1 = malloc(length + 1);
+  if (latin1) {
+    memcpy(latin1, *ptr, length);
+    latin1[length] = 0;
+
+    if (!full) {
+      id3_latin1_t *check;
+
+      for (check = latin1; *check; ++check) {
+	if (*check == '\n')
+	  *check = ' ';
+      }
+    }
+  }
+
+  *ptr += length + terminated;
+
+  return latin1;
+}
+
+id3_ucs4_t *id3_parse_string(id3_byte_t const **ptr, id3_length_t length,
+			     enum id3_field_textencoding encoding, int full)
+{
+  id3_ucs4_t *ucs4 = 0;
+  enum id3_utf16_byteorder byteorder = ID3_UTF16_BYTEORDER_ANY;
+
+  switch (encoding) {
+  case ID3_FIELD_TEXTENCODING_ISO_8859_1:
+    ucs4 = id3_latin1_deserialize(ptr, length);
+    break;
+
+  case ID3_FIELD_TEXTENCODING_UTF_16BE:
+    byteorder = ID3_UTF16_BYTEORDER_BE;
+  case ID3_FIELD_TEXTENCODING_UTF_16:
+    ucs4 = id3_utf16_deserialize(ptr, length, byteorder);
+    break;
+
+  case ID3_FIELD_TEXTENCODING_UTF_8:
+    ucs4 = id3_utf8_deserialize(ptr, length);
+    break;
+  default:
+    /* FIXME: Unknown encoding! Print warning? */
+    return NULL;
+  }
+
+  if (ucs4 && !full) {
+    id3_ucs4_t *check;
+
+    for (check = ucs4; *check; ++check) {
+      if (*check == '\n')
+	*check = ' ';
+    }
+  }
+
+  return ucs4;
+}
+
+id3_byte_t *id3_parse_binary(id3_byte_t const **ptr, id3_length_t length)
+{
+  id3_byte_t *data;
+
+  if (length == 0)
+    return malloc(1);
+
+  data = malloc(length);
+  if (data)
+    memcpy(data, *ptr, length);
+
+  *ptr += length;
+
+  return data;
+}
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new/utf16.c
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new/utf16.c	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new/utf16.c	(revision 5)
@@ -0,0 +1,299 @@
+/*
+ * libid3tag - ID3 tag manipulation library
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * $Id: utf16.c,v 1.9 2004/01/23 09:41:32 rob Exp $
+ */
+
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
+
+# include "global.h"
+
+# include <stdlib.h>
+
+# include "id3tag.h"
+# include "utf16.h"
+# include "ucs4.h"
+
+/*
+ * NAME:	utf16->length()
+ * DESCRIPTION:	return the number of ucs4 chars represented by a utf16 string
+ */
+id3_length_t id3_utf16_length(id3_utf16_t const *utf16)
+{
+  id3_length_t length = 0;
+
+  while (*utf16) {
+    if (utf16[0] < 0xd800 || utf16[0] > 0xdfff)
+      ++length;
+    else if (utf16[0] >= 0xd800 && utf16[0] <= 0xdbff &&
+	     utf16[1] >= 0xdc00 && utf16[1] <= 0xdfff) {
+      ++length;
+      ++utf16;
+    }
+
+    ++utf16;
+  }
+
+  return length;
+}
+
+/*
+ * NAME:	utf16->size()
+ * DESCRIPTION:	return the encoding size of a utf16 string
+ */
+id3_length_t id3_utf16_size(id3_utf16_t const *utf16)
+{
+  id3_utf16_t const *ptr = utf16;
+
+  while (*ptr)
+    ++ptr;
+
+  return ptr - utf16 + 1;
+}
+
+/*
+ * NAME:	utf16->ucs4duplicate()
+ * DESCRIPTION:	duplicate and decode a utf16 string into ucs4
+ */
+id3_ucs4_t *id3_utf16_ucs4duplicate(id3_utf16_t const *utf16)
+{
+  id3_ucs4_t *ucs4;
+
+  ucs4 = malloc((id3_utf16_length(utf16) + 1) * sizeof(*ucs4));
+  if (ucs4)
+    id3_utf16_decode(utf16, ucs4);
+
+  return release(ucs4);
+}
+
+/*
+ * NAME:	utf16->decodechar()
+ * DESCRIPTION:	decode a series of utf16 chars into a single ucs4 char
+ */
+id3_length_t id3_utf16_decodechar(id3_utf16_t const *utf16, id3_ucs4_t *ucs4)
+{
+  id3_utf16_t const *start = utf16;
+
+  while (1) {
+    if (utf16[0] < 0xd800 || utf16[0] > 0xdfff) {
+      *ucs4 = utf16[0];
+      return utf16 - start + 1;
+    }
+    else if (utf16[0] >= 0xd800 && utf16[0] <= 0xdbff &&
+	     utf16[1] >= 0xdc00 && utf16[1] <= 0xdfff) {
+      *ucs4 = (((utf16[0] & 0x03ffL) << 10) |
+	       ((utf16[1] & 0x03ffL) <<  0)) + 0x00010000L;
+      return utf16 - start + 2;
+    }
+
+    ++utf16;
+  }
+}
+
+/*
+ * NAME:	utf16->encodechar()
+ * DESCRIPTION:	encode a single ucs4 char into a series of up to 2 utf16 chars
+ */
+id3_length_t id3_utf16_encodechar(id3_utf16_t *utf16, id3_ucs4_t ucs4)
+{
+  if (ucs4 < 0x00010000L) {
+    utf16[0] = ucs4;
+
+    return 1;
+  }
+  else if (ucs4 < 0x00110000L) {
+    ucs4 -= 0x00010000L;
+
+    utf16[0] = ((ucs4 >> 10) & 0x3ff) | 0xd800;
+    utf16[1] = ((ucs4 >>  0) & 0x3ff) | 0xdc00;
+
+    return 2;
+  }
+
+  /* default */
+
+  return id3_utf16_encodechar(utf16, ID3_UCS4_REPLACEMENTCHAR);
+}
+
+/*
+ * NAME:	utf16->decode()
+ * DESCRIPTION:	decode a complete utf16 string into a ucs4 string
+ */
+void id3_utf16_decode(id3_utf16_t const *utf16, id3_ucs4_t *ucs4)
+{
+  do
+    utf16 += id3_utf16_decodechar(utf16, ucs4);
+  while (*ucs4++);
+}
+
+/*
+ * NAME:	utf16->encode()
+ * DESCRIPTION:	encode a complete ucs4 string into a utf16 string
+ */
+void id3_utf16_encode(id3_utf16_t *utf16, id3_ucs4_t const *ucs4)
+{
+  do
+    utf16 += id3_utf16_encodechar(utf16, *ucs4);
+  while (*ucs4++);
+}
+
+/*
+ * NAME:	utf16->put()
+ * DESCRIPTION:	serialize a single utf16 character
+ */
+id3_length_t id3_utf16_put(id3_byte_t **ptr, id3_utf16_t utf16,
+			   enum id3_utf16_byteorder byteorder)
+{
+  if (ptr) {
+    switch (byteorder) {
+    default:
+    case ID3_UTF16_BYTEORDER_BE:
+      (*ptr)[0] = (utf16 >> 8) & 0xff;
+      (*ptr)[1] = (utf16 >> 0) & 0xff;
+      break;
+
+    case ID3_UTF16_BYTEORDER_LE:
+      (*ptr)[0] = (utf16 >> 0) & 0xff;
+      (*ptr)[1] = (utf16 >> 8) & 0xff;
+      break;
+    }
+
+    *ptr += 2;
+  }
+
+  return 2;
+}
+
+/*
+ * NAME:	utf16->get()
+ * DESCRIPTION:	deserialize a single utf16 character
+ */
+id3_utf16_t id3_utf16_get(id3_byte_t const **ptr,
+			  enum id3_utf16_byteorder byteorder)
+{
+  id3_utf16_t utf16;
+
+  switch (byteorder) {
+  default:
+  case ID3_UTF16_BYTEORDER_BE:
+    utf16 =
+      ((*ptr)[0] << 8) |
+      ((*ptr)[1] << 0);
+    break;
+
+  case ID3_UTF16_BYTEORDER_LE:
+    utf16 =
+      ((*ptr)[0] << 0) |
+      ((*ptr)[1] << 8);
+    break;
+  }
+
+  *ptr += 2;
+
+  return utf16;
+}
+
+/*
+ * NAME:	utf16->serialize()
+ * DESCRIPTION:	serialize a ucs4 string using utf16 encoding
+ */
+id3_length_t id3_utf16_serialize(id3_byte_t **ptr, id3_ucs4_t const *ucs4,
+				 enum id3_utf16_byteorder byteorder,
+				 int terminate)
+{
+  id3_length_t size = 0;
+  id3_utf16_t utf16[2], *out;
+
+  if (byteorder == ID3_UTF16_BYTEORDER_ANY)
+    size += id3_utf16_put(ptr, 0xfeff, byteorder);
+
+  while (*ucs4) {
+    switch (id3_utf16_encodechar(out = utf16, *ucs4++)) {
+    case 2: size += id3_utf16_put(ptr, *out++, byteorder);
+    case 1: size += id3_utf16_put(ptr, *out++, byteorder);
+    case 0: break;
+    }
+  }
+
+  if (terminate)
+    size += id3_utf16_put(ptr, 0, byteorder);
+
+  return size;
+}
+
+/*
+ * NAME:	utf16->deserialize()
+ * DESCRIPTION:	deserialize a ucs4 string using utf16 encoding
+ */
+id3_ucs4_t *id3_utf16_deserialize(id3_byte_t const **ptr, id3_length_t length,
+				  enum id3_utf16_byteorder byteorder)
+{
+  id3_byte_t const *end;
+  id3_utf16_t *utf16ptr, *utf16;
+  id3_ucs4_t *ucs4;
+
+  end = *ptr + (length & ~1);
+
+  utf16 = malloc((length / 2 + 1) * sizeof(*utf16));
+  if (utf16 == 0)
+    return 0;
+
+  if (byteorder == ID3_UTF16_BYTEORDER_ANY && end - *ptr > 0) {
+    switch (((*ptr)[0] << 8) |
+	    ((*ptr)[1] << 0)) {
+    case 0xfeff:
+      byteorder = ID3_UTF16_BYTEORDER_BE;
+      *ptr += 2;
+      break;
+
+    case 0xfffe:
+      byteorder = ID3_UTF16_BYTEORDER_LE;
+      *ptr += 2;
+      break;
+    }
+  }
+
+  utf16ptr = utf16;
+  while (end - *ptr > 0 && (*utf16ptr = id3_utf16_get(ptr, byteorder)))
+    ++utf16ptr;
+
+  *utf16ptr = 0;
+
+  ucs4 = malloc((id3_utf16_length(utf16) + 1) * sizeof(*ucs4));
+  if (ucs4)
+    id3_utf16_decode(utf16, ucs4);
+
+  free(utf16);
+
+  if (end == *ptr && length % 2 != 0)
+  {
+     /* We were called with a bogus length.  It should always
+      * be an even number.  We can deal with this in a few ways:
+      * - Always give an error.
+      * - Try and parse as much as we can and
+      *   - return an error if we're called again when we
+      *     already tried to parse everything we can.
+      *   - tell that we parsed it, which is what we do here.
+      */
+     (*ptr)++;
+  }
+
+  return ucs4;
+}
Index: create-0.15.1b-patch/libid3tag-0.15.1b-new
===================================================================
--- create-0.15.1b-patch/libid3tag-0.15.1b-new	(nonexistent)
+++ create-0.15.1b-patch/libid3tag-0.15.1b-new	(revision 5)

Property changes on: create-0.15.1b-patch/libid3tag-0.15.1b-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-0.15.1b-patch
===================================================================
--- create-0.15.1b-patch	(nonexistent)
+++ create-0.15.1b-patch	(revision 5)

Property changes on: create-0.15.1b-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: patches/README
===================================================================
--- patches/README	(nonexistent)
+++ patches/README	(revision 5)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: patches
===================================================================
--- patches	(nonexistent)
+++ patches	(revision 5)

Property changes on: patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~