diff --git a/SPECS-EXTENDED/libid3tag/cmake-hook-genre.dat-and-gperf-files-generation.patch b/SPECS-EXTENDED/libid3tag/cmake-hook-genre.dat-and-gperf-files-generation.patch new file mode 100644 index 00000000000..664f82f65df --- /dev/null +++ b/SPECS-EXTENDED/libid3tag/cmake-hook-genre.dat-and-gperf-files-generation.patch @@ -0,0 +1,1627 @@ +From 243b99b2f02fed9f251228cfdaf4d4ab9ab06561 Mon Sep 17 00:00:00 2001 +From: Leigh Scott +Date: Wed, 31 Aug 2022 13:35:16 +0100 +Subject: [PATCH] cmake: hook genre.dat and gperf files generation + +--- + CMakeLists.txt | 26 ++- + compat.c | 502 ------------------------------------------- + frametype.c | 564 ------------------------------------------------- + genre.dat | 480 ----------------------------------------- + 4 files changed, 24 insertions(+), 1548 deletions(-) + delete mode 100644 compat.c + delete mode 100644 frametype.c + delete mode 100644 genre.dat + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 397912f..7829188 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,16 +8,38 @@ include(GNUInstallDirs) + # + # Build + # ++add_custom_command( ++ COMMAND sed -n -f genre.dat.sed genre.dat.in > ${CMAKE_CURRENT_BINARY_DIR}/genre.dat ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/genre.dat ++ MAIN_DEPENDENCY genre.dat.in ++ DEPENDS genre.dat.sed ++) ++ ++find_program(GPERF NAMES gperf) ++ ++add_custom_command( ++ COMMAND ${GPERF} -tCcTonD --output-file=${CMAKE_CURRENT_BINARY_DIR}/compat.c -K id -N id3_compat_lookup -s -3 -k '*' ${CMAKE_CURRENT_SOURCE_DIR}/compat.gperf ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compat.c ++ MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/compat.gperf ++) ++ ++add_custom_command( ++ COMMAND ${GPERF} -tCcTonD --output-file=${CMAKE_CURRENT_BINARY_DIR}/frametype.c -K id -N id3_frametype_lookup -s -3 -k '*' ${CMAKE_CURRENT_SOURCE_DIR}/frametype.gperf ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/frametype.c ++ MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/frametype.gperf ++) + + add_library(id3tag +- compat.c ++ ${CMAKE_CURRENT_BINARY_DIR}/compat.c + crc.c + debug.c + field.c + file.c + frame.c +- frametype.c ++ ${CMAKE_CURRENT_BINARY_DIR}/frametype.c + genre.c ++ ${CMAKE_CURRENT_BINARY_DIR}/genre.dat + latin1.c + parse.c + render.c +diff --git a/compat.c b/compat.c +deleted file mode 100644 +index 48d486a..0000000 +--- a/compat.c ++++ /dev/null +@@ -1,502 +0,0 @@ +-/* 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 ." +-#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 +- */ +- +-# include "global.h" +- +-# include +-# include +- +-# ifdef HAVE_ASSERT_H +-# include +-# 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 +-const struct id3_compat * +-id3_compat_lookup (str, len) +- register const char *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 (!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; +-} +diff --git a/frametype.c b/frametype.c +deleted file mode 100644 +index 02aea5d..0000000 +--- a/frametype.c ++++ /dev/null +@@ -1,564 +0,0 @@ +-/* C code produced by gperf version 3.0.1 */ +-/* Command-line: gperf -tCcTonD -K id -N id3_frametype_lookup -s -3 -k '*' frametype.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 ." +-#endif +- +-#line 1 "frametype.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: frametype.gperf,v 1.7 2004/01/23 09:41:32 rob Exp +- */ +- +-# include "global.h" +- +-# include +- +-# include "id3tag.h" +-# include "frametype.h" +- +-# define FIELDS(id) static enum id3_field_type const fields_##id[] +- +-/* frame field descriptions */ +- +-FIELDS(UFID) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(TXXX) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_STRING +-}; +- +-FIELDS(WXXX) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_LATIN1 +-}; +- +-FIELDS(MCDI) = { +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(ETCO) = { +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(MLLT) = { +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_INT24, +- ID3_FIELD_TYPE_INT24, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(SYTC) = { +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(USLT) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LANGUAGE, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_STRINGFULL +-}; +- +-FIELDS(SYLT) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LANGUAGE, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(COMM) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LANGUAGE, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_STRINGFULL +-}; +- +-FIELDS(RVA2) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(EQU2) = { +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(RVRB) = { +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT8 +-}; +- +-FIELDS(APIC) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(GEOB) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(PCNT) = { +- ID3_FIELD_TYPE_INT32PLUS +-}; +- +-FIELDS(POPM) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT32PLUS +-}; +- +-FIELDS(RBUF) = { +- ID3_FIELD_TYPE_INT24, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_INT32 +-}; +- +-FIELDS(AENC) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(LINK) = { +- ID3_FIELD_TYPE_FRAMEID, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_LATIN1LIST +-}; +- +-FIELDS(POSS) = { +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(USER) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LANGUAGE, +- ID3_FIELD_TYPE_STRING +-}; +- +-FIELDS(OWNE) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_DATE, +- ID3_FIELD_TYPE_STRING +-}; +- +-FIELDS(COMR) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_DATE, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_STRING, +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(ENCR) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(GRID) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(PRIV) = { +- ID3_FIELD_TYPE_LATIN1, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(SIGN) = { +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(SEEK) = { +- ID3_FIELD_TYPE_INT32 +-}; +- +-FIELDS(ASPI) = { +- ID3_FIELD_TYPE_INT32, +- ID3_FIELD_TYPE_INT32, +- ID3_FIELD_TYPE_INT16, +- ID3_FIELD_TYPE_INT8, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(text) = { +- ID3_FIELD_TYPE_TEXTENCODING, +- ID3_FIELD_TYPE_STRINGLIST +-}; +- +-FIELDS(url) = { +- ID3_FIELD_TYPE_LATIN1 +-}; +- +-FIELDS(unknown) = { +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-FIELDS(ZOBS) = { +- ID3_FIELD_TYPE_FRAMEID, +- ID3_FIELD_TYPE_BINARYDATA +-}; +- +-# define FRAME(id) \ +- sizeof(fields_##id) / sizeof(fields_##id[0]), fields_##id +- +-# define PRESERVE 0 +-# define DISCARD ID3_FRAME_FLAG_FILEALTERPRESERVATION +-# define OBSOLETE (DISCARD | ID3_FRAME_FLAG_TAGALTERPRESERVATION) +- +-# define FRAMETYPE(type, id, flags, desc) \ +- struct id3_frametype const id3_frametype_##type = { \ +- 0, FRAME(id), flags, desc \ +- } +- +-/* static frame types */ +- +-FRAMETYPE(text, text, PRESERVE, "Unknown text information frame"); +-FRAMETYPE(url, url, PRESERVE, "Unknown URL link frame"); +-FRAMETYPE(experimental, unknown, PRESERVE, "Experimental frame"); +-FRAMETYPE(unknown, unknown, PRESERVE, "Unknown frame"); +-FRAMETYPE(obsolete, unknown, OBSOLETE, "Obsolete frame"); +- +-#define TOTAL_KEYWORDS 84 +-#define MIN_WORD_LENGTH 4 +-#define MAX_WORD_LENGTH 4 +-#define MIN_HASH_VALUE 7 +-#define MAX_HASH_VALUE 155 +-/* maximum key range = 149, 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[] = +- { +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 43, 4, 47, 49, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 31, 53, 3, 15, 3, +- 24, 25, 10, 52, 69, 34, 23, 30, 1, 5, +- 10, 62, 20, 0, 28, 28, 22, 19, 47, 3, +- 10, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +- 156, 156, 156, 156, 156, 156, 156 +- }; +- return asso_values[(unsigned char)str[3]+1] + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]]; +-} +- +-#ifdef __GNUC__ +-__inline +-#endif +-const struct id3_frametype * +-id3_frametype_lookup (str, len) +- register const char *str; +- register size_t len; +-{ +- static const struct id3_frametype wordlist[] = +- { +-#line 282 "frametype.gperf" +- {"ENCR", FRAME(ENCR), PRESERVE, "Encryption method registration"}, +-#line 292 "frametype.gperf" +- {"POPM", FRAME(POPM), PRESERVE, "Popularimeter"}, +-#line 351 "frametype.gperf" +- {"WCOM", FRAME(url), PRESERVE, "Commercial information"}, +-#line 298 "frametype.gperf" +- {"SEEK", FRAME(SEEK), DISCARD, "Seek frame"}, +-#line 349 "frametype.gperf" +- {"USER", FRAME(USER), PRESERVE, "Terms of use"}, +-#line 285 "frametype.gperf" +- {"GEOB", FRAME(GEOB), PRESERVE, "General encapsulated object"}, +-#line 304 "frametype.gperf" +- {"TCOM", FRAME(text), PRESERVE, "Composer"}, +-#line 281 "frametype.gperf" +- {"COMR", FRAME(COMR), PRESERVE, "Commercial frame"}, +-#line 280 "frametype.gperf" +- {"COMM", FRAME(COMM), PRESERVE, "Comments"}, +-#line 305 "frametype.gperf" +- {"TCON", FRAME(text), PRESERVE, "Content type"}, +-#line 291 "frametype.gperf" +- {"PCNT", FRAME(PCNT), PRESERVE, "Play counter"}, +-#line 293 "frametype.gperf" +- {"POSS", FRAME(POSS), DISCARD, "Position synchronisation frame"}, +-#line 284 "frametype.gperf" +- {"ETCO", FRAME(ETCO), DISCARD, "Event timing codes"}, +-#line 332 "frametype.gperf" +- {"TPE2", FRAME(text), PRESERVE, "Band/orchestra/accompaniment"}, +-#line 301 "frametype.gperf" +- {"SYTC", FRAME(SYTC), DISCARD, "Synchronised tempo codes"}, +-#line 313 "frametype.gperf" +- {"TENC", FRAME(text), DISCARD, "Encoded by"}, +-#line 309 "frametype.gperf" +- {"TDOR", FRAME(text), PRESERVE, "Original release time"}, +-#line 290 "frametype.gperf" +- {"OWNE", FRAME(OWNE), PRESERVE, "Ownership frame"}, +-#line 277 "frametype.gperf" +- {"AENC", FRAME(AENC), DISCARD, "Audio encryption"}, +-#line 307 "frametype.gperf" +- {"TDEN", FRAME(text), PRESERVE, "Encoding time"}, +-#line 345 "frametype.gperf" +- {"TSSE", FRAME(text), PRESERVE, "Software/hardware and settings used for encoding"}, +-#line 339 "frametype.gperf" +- {"TRSN", FRAME(text), PRESERVE, "Internet radio station name"}, +-#line 300 "frametype.gperf" +- {"SYLT", FRAME(SYLT), DISCARD, "Synchronised lyric/text"}, +-#line 354 "frametype.gperf" +- {"WOAR", FRAME(url), PRESERVE, "Official artist/performer webpage"}, +-#line 346 "frametype.gperf" +- {"TSST", FRAME(text), PRESERVE, "Set subtitle"}, +-#line 330 "frametype.gperf" +- {"TOWN", FRAME(text), PRESERVE, "File owner/licensee"}, +-#line 340 "frametype.gperf" +- {"TRSO", FRAME(text), PRESERVE, "Internet radio station owner"}, +-#line 322 "frametype.gperf" +- {"TLEN", FRAME(text), DISCARD, "Length"}, +-#line 358 "frametype.gperf" +- {"WPUB", FRAME(url), PRESERVE, "Publishers official webpage"}, +-#line 343 "frametype.gperf" +- {"TSOT", FRAME(text), PRESERVE, "Title sort order"}, +-#line 327 "frametype.gperf" +- {"TOFN", FRAME(text), PRESERVE, "Original filename"}, +-#line 344 "frametype.gperf" +- {"TSRC", FRAME(text), PRESERVE, "ISRC (international standard recording code)"}, +-#line 324 "frametype.gperf" +- {"TMED", FRAME(text), PRESERVE, "Media type"}, +-#line 297 "frametype.gperf" +- {"RVRB", FRAME(RVRB), PRESERVE, "Reverb"}, +-#line 328 "frametype.gperf" +- {"TOLY", FRAME(text), PRESERVE, "Original lyricist(s)/text writer(s)"}, +-#line 329 "frametype.gperf" +- {"TOPE", FRAME(text), PRESERVE, "Original artist(s)/performer(s)"}, +-#line 336 "frametype.gperf" +- {"TPRO", FRAME(text), PRESERVE, "Produced notice"}, +-#line 337 "frametype.gperf" +- {"TPUB", FRAME(text), PRESERVE, "Publisher"}, +-#line 357 "frametype.gperf" +- {"WPAY", FRAME(url), PRESERVE, "Payment"}, +-#line 335 "frametype.gperf" +- {"TPOS", FRAME(text), PRESERVE, "Part of a set"}, +-#line 356 "frametype.gperf" +- {"WORS", FRAME(url), PRESERVE, "Official Internet radio station homepage"}, +-#line 325 "frametype.gperf" +- {"TMOO", FRAME(text), PRESERVE, "Mood"}, +-#line 338 "frametype.gperf" +- {"TRCK", FRAME(text), PRESERVE, "Track number/position in set"}, +-#line 320 "frametype.gperf" +- {"TKEY", FRAME(text), PRESERVE, "Initial key"}, +-#line 308 "frametype.gperf" +- {"TDLY", FRAME(text), PRESERVE, "Playlist delay"}, +-#line 296 "frametype.gperf" +- {"RVA2", FRAME(RVA2), DISCARD, "Relative volume adjustment (2)"}, +-#line 310 "frametype.gperf" +- {"TDRC", FRAME(text), PRESERVE, "Recording time"}, +-#line 350 "frametype.gperf" +- {"USLT", FRAME(USLT), PRESERVE, "Unsynchronised lyric/text transcription"}, +-#line 353 "frametype.gperf" +- {"WOAF", FRAME(url), PRESERVE, "Official audio file webpage"}, +-#line 312 "frametype.gperf" +- {"TDTG", FRAME(text), PRESERVE, "Tagging time"}, +-#line 299 "frametype.gperf" +- {"SIGN", FRAME(SIGN), PRESERVE, "Signature frame"}, +-#line 355 "frametype.gperf" +- {"WOAS", FRAME(url), PRESERVE, "Official audio source webpage"}, +-#line 331 "frametype.gperf" +- {"TPE1", FRAME(text), PRESERVE, "Lead performer(s)/soloist(s)"}, +-#line 302 "frametype.gperf" +- {"TALB", FRAME(text), PRESERVE, "Album/movie/show title"}, +-#line 341 "frametype.gperf" +- {"TSOA", FRAME(text), PRESERVE, "Album sort order"}, +-#line 321 "frametype.gperf" +- {"TLAN", FRAME(text), PRESERVE, "Language(s)"}, +-#line 333 "frametype.gperf" +- {"TPE3", FRAME(text), PRESERVE, "Conductor/performer refinement"}, +-#line 352 "frametype.gperf" +- {"WCOP", FRAME(url), PRESERVE, "Copyright/legal information"}, +-#line 334 "frametype.gperf" +- {"TPE4", FRAME(text), PRESERVE, "Interpreted, remixed, or otherwise modified by"}, +-#line 323 "frametype.gperf" +- {"TMCL", FRAME(text), PRESERVE, "Musician credits list"}, +-#line 303 "frametype.gperf" +- {"TBPM", FRAME(text), PRESERVE, "BPM (beats per minute)"}, +-#line 311 "frametype.gperf" +- {"TDRL", FRAME(text), PRESERVE, "Release time"}, +-#line 326 "frametype.gperf" +- {"TOAL", FRAME(text), PRESERVE, "Original album/movie/show title"}, +-#line 342 "frametype.gperf" +- {"TSOP", FRAME(text), PRESERVE, "Performer sort order"}, +-#line 363 "frametype.gperf" +- {"ZOBS", FRAME(ZOBS), OBSOLETE, "Obsolete frame"}, +-#line 283 "frametype.gperf" +- {"EQU2", FRAME(EQU2), DISCARD, "Equalisation (2)"}, +-#line 306 "frametype.gperf" +- {"TCOP", FRAME(text), PRESERVE, "Copyright message"}, +-#line 287 "frametype.gperf" +- {"LINK", FRAME(LINK), PRESERVE, "Linked information"}, +-#line 286 "frametype.gperf" +- {"GRID", FRAME(GRID), PRESERVE, "Group identification registration"}, +-#line 294 "frametype.gperf" +- {"PRIV", FRAME(PRIV), PRESERVE, "Private frame"}, +-#line 315 "frametype.gperf" +- {"TFLT", FRAME(text), PRESERVE, "File type"}, +-#line 289 "frametype.gperf" +- {"MLLT", FRAME(MLLT), DISCARD, "MPEG location lookup table"}, +-#line 314 "frametype.gperf" +- {"TEXT", FRAME(text), PRESERVE, "Lyricist/text writer"}, +-#line 348 "frametype.gperf" +- {"UFID", FRAME(UFID), PRESERVE, "Unique file identifier"}, +-#line 278 "frametype.gperf" +- {"APIC", FRAME(APIC), PRESERVE, "Attached picture"}, +-#line 279 "frametype.gperf" +- {"ASPI", FRAME(ASPI), DISCARD, "Audio seek point index"}, +-#line 318 "frametype.gperf" +- {"TIT2", FRAME(text), PRESERVE, "Title/songname/content description"}, +-#line 359 "frametype.gperf" +- {"WXXX", FRAME(WXXX), PRESERVE, "User defined URL link frame"}, +-#line 288 "frametype.gperf" +- {"MCDI", FRAME(MCDI), PRESERVE, "Music CD identifier"}, +-#line 316 "frametype.gperf" +- {"TIPL", FRAME(text), PRESERVE, "Involved people list"}, +-#line 347 "frametype.gperf" +- {"TXXX", FRAME(TXXX), PRESERVE, "User defined text information frame"}, +-#line 295 "frametype.gperf" +- {"RBUF", FRAME(RBUF), PRESERVE, "Recommended buffer size"}, +-#line 317 "frametype.gperf" +- {"TIT1", FRAME(text), PRESERVE, "Content group description"}, +-#line 319 "frametype.gperf" +- {"TIT3", FRAME(text), PRESERVE, "Subtitle/description refinement"} +- }; +- +- static const short lookup[] = +- { +- -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, +- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, +- 2, 3, -1, 4, -1, -1, -1, -1, 5, 6, 7, 8, -1, 9, +- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, +- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, +- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, +- 66, 67, 68, 69, -1, 70, 71, -1, 72, 73, 74, -1, 75, -1, +- 76, -1, -1, -1, 77, 78, -1, -1, 79, -1, -1, -1, -1, 80, +- 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, -1, -1, +- -1, 83 +- }; +- +- 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; +-} +diff --git a/genre.dat b/genre.dat +deleted file mode 100644 +index 1f02779..0000000 +--- a/genre.dat ++++ /dev/null +@@ -1,480 +0,0 @@ +-/* 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 +-}; +-- +2.37.2 + diff --git a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-fix_overflow.patch b/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-fix_overflow.patch deleted file mode 100644 index 26c54c5d2cf..00000000000 --- a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-fix_overflow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- field.c.orig 2008-05-05 09:49:15.000000000 -0400 -+++ field.c 2008-05-05 09:49:25.000000000 -0400 -@@ -291,7 +291,7 @@ - - end = *ptr + length; - -- while (end - *ptr > 0) { -+ while (end - *ptr > 0 && **ptr != '\0') { - ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0); - if (ucs4 == 0) - goto fail; diff --git a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-gperf-size_t.patch b/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-gperf-size_t.patch deleted file mode 100644 index 588bde9c3d4..00000000000 --- a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-gperf-size_t.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: libid3tag-0.15.1b/frametype.h -=================================================================== ---- libid3tag-0.15.1b.orig/frametype.h -+++ libid3tag-0.15.1b/frametype.h -@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_fr - extern struct id3_frametype const id3_frametype_obsolete; - - struct id3_frametype const *id3_frametype_lookup(register char const *, -- register unsigned int); -+ register size_t); - - # endif -Index: libid3tag-0.15.1b/compat.h -=================================================================== ---- libid3tag-0.15.1b.orig/compat.h -+++ libid3tag-0.15.1b/compat.h -@@ -34,7 +34,7 @@ struct id3_compat { - }; - - struct id3_compat const *id3_compat_lookup(register char const *, -- register unsigned int); -+ register size_t); - - int id3_compat_fixup(struct id3_tag *); - diff --git a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-handle-unknown-encoding.patch b/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-handle-unknown-encoding.patch deleted file mode 100644 index 7387f2f7d47..00000000000 --- a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-handle-unknown-encoding.patch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 11_unknown_encoding.dpatch by Andreas Henriksson -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: In case of an unknown/invalid encoding, id3_parse_string() will -## DP: return NULL, but the return value wasn't checked resulting -## DP: in segfault in id3_ucs4_length(). This is the only place -## DP: the return value wasn't checked. - -@DPATCH@ -diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf ---- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000 -+++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000 -@@ -236,6 +236,10 @@ - - 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); -diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c ---- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000 -+++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000 -@@ -165,6 +165,9 @@ - case ID3_FIELD_TEXTENCODING_UTF_8: - ucs4 = id3_utf8_deserialize(ptr, length); - break; -+ default: -+ /* FIXME: Unknown encoding! Print warning? */ -+ return NULL; - } - - if (ucs4 && !full) { diff --git a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v1-zero-padding.patch b/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v1-zero-padding.patch deleted file mode 100644 index fdda08410b3..00000000000 --- a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v1-zero-padding.patch +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10_id3v1_zeropadding.dpatch by -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Use zero padding instead of space padding for ID3V1 fields -## DP: (as requested by http://id3lib.sourceforge.net/id3/id3v1.html). - -@DPATCH@ -diff -urNad libid3tag-0.15.1b~/render.c libid3tag-0.15.1b/render.c ---- libid3tag-0.15.1b~/render.c 2004-01-23 10:41:32.000000000 +0100 -+++ libid3tag-0.15.1b/render.c 2009-11-09 17:17:48.000000000 +0100 -@@ -183,18 +183,16 @@ - end = data + length; - - if (ucs4) { -- while (*ucs4 && end - data > 0) { -+ while (*ucs4 && end - data > 0) - *data++ = *ucs4++; -- -- if (data[-1] == '\n') -- data[-1] = ' '; -- } - } - -- while (end - data > 0) -- *data++ = ' '; -- - *data = 0; - -- return id3_latin1_serialize(ptr, padded, 0); -+ id3_latin1_serialize(ptr, padded, 0); -+ -+ if (end - data > 0) -+ id3_render_padding(ptr, 0, end - data); -+ -+ return length; - } diff --git a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v2-endless-loop.patch b/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v2-endless-loop.patch deleted file mode 100644 index c4557f133bc..00000000000 --- a/SPECS-EXTENDED/libid3tag/libid3tag-0.15.1b-id3v2-endless-loop.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- utf16.c.old 2005-01-07 12:35:28.622883237 +0100 -+++ utf16.c 2005-01-07 12:35:36.603673548 +0100 -@@ -250,6 +250,8 @@ - id3_ucs4_t *ucs4; - - end = *ptr + (length & ~1); -+ if (end == *ptr) -+ return 0; - - utf16 = malloc((length / 2 + 1) * sizeof(*utf16)); - if (utf16 == 0) diff --git a/SPECS-EXTENDED/libid3tag/libid3tag.signatures.json b/SPECS-EXTENDED/libid3tag/libid3tag.signatures.json index 12a37d0b8d0..fdd88833060 100644 --- a/SPECS-EXTENDED/libid3tag/libid3tag.signatures.json +++ b/SPECS-EXTENDED/libid3tag/libid3tag.signatures.json @@ -1,5 +1,5 @@ { "Signatures": { - "libid3tag-0.15.1b.tar.gz": "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151" + "libid3tag-0.16.3.tar.gz": "0561009778513a95d91dac33cee8418d6622f710450a7cb56a74636d53b588cb" } } diff --git a/SPECS-EXTENDED/libid3tag/libid3tag.spec b/SPECS-EXTENDED/libid3tag/libid3tag.spec index 08c3f91e411..8da44ef6008 100644 --- a/SPECS-EXTENDED/libid3tag/libid3tag.spec +++ b/SPECS-EXTENDED/libid3tag/libid3tag.spec @@ -1,24 +1,17 @@ Vendor: Microsoft Corporation Distribution: Azure Linux Name: libid3tag -Version: 0.15.1b -Release: 33%{?dist} +Version: 0.16.3 +Release: 7%{?dist} Summary: ID3 tag manipulation library -License: GPLv2+ -URL: http://www.underbit.com/products/mad/ -Source0: http://downloads.sourceforge.net/mad/%{name}-%{version}.tar.gz -Patch0: libid3tag-0.15.1b-fix_overflow.patch -Patch1: libid3tag-0.15.1b-id3v1-zero-padding.patch -Patch2: libid3tag-0.15.1b-handle-unknown-encoding.patch -Patch3: libid3tag-0.15.1b-id3v2-endless-loop.patch -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869598 -Patch4: libid3tag-0.15.1b-gperf-size_t.patch - -BuildRequires: gcc -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool +License: GPL-2.0-or-later +URL: https://codeberg.org/tenacityteam/libid3tag +Source0: https://codeberg.org/tenacityteam/libid3tag/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: cmake-hook-genre.dat-and-gperf-files-generation.patch + +BuildRequires: gcc-c++ +BuildRequires: cmake BuildRequires: gperf BuildRequires: zlib-devel >= 1.1.4 @@ -26,7 +19,6 @@ BuildRequires: zlib-devel >= 1.1.4 libid3tag is a library for reading and (eventually) writing ID3 tags, both ID3v1 and the various versions of ID3v2. - %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -34,64 +26,72 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel ID3 tag library development files. - %prep -%setup -q -%patch 0 -p0 -b .CVE-2008-2109 -%patch 1 -p1 -b .zero-padding -%patch 2 -p1 -b .unknown-encoding -%patch 3 -p0 -b .endless-loop -%patch 4 -p1 -b .gperf - -touch NEWS AUTHORS ChangeLog - -# Force these files to be regenerated from the .gperf sources. -rm compat.c frametype.c - -# *.pc originally from the Debian package. -cat << \EOF > %{name}.pc -prefix=%{_prefix} -exec_prefix=%{_exec_prefix} -libdir=%{_libdir} -includedir=%{_includedir} - -Name: id3tag -Description: ID3 tag manipulation library -Requires: -Version: %{version} -Libs: -lid3tag -Cflags: -EOF - +%autosetup -p1 -n %{name} %build -# Run autoreconf so that it doesn't check for cxx and doesn't clobber CFLAGS -autoreconf -vfi -%configure --disable-static -%make_build - +%cmake +%cmake_build %install -%make_install -rm -vf $RPM_BUILD_ROOT%{_libdir}/*.la -install -Dpm 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/id3tag.pc +%cmake_install %ldconfig_scriptlets %files %doc CHANGES CREDITS README TODO %license COPYING COPYRIGHT -%{_libdir}/libid3tag.so.* +%{_libdir}/libid3tag.so.0* %files devel %{_includedir}/id3tag.h %{_libdir}/libid3tag.so +%{_libdir}/cmake/id3tag/ %{_libdir}/pkgconfig/id3tag.pc - %changelog +* Fri Oct 10 2024 Durga Jagadeesh Palli - 0.16.3-7 +- Initial Azure Linux import from Fedora 41 (license: MIT) +- License verified. + +* Thu Jul 18 2024 Fedora Release Engineering - 0.16.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Apr 17 2024 Peter Lemenkov - 0.16.3-5 +- Use autorelease macro + +* Thu Jan 25 2024 Fedora Release Engineering - 0.16.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 0.16.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Dec 14 2023 Leigh Scott - 0.16.3-1 +- Update to 0.16.3 + +* Thu Jul 20 2023 Fedora Release Engineering - 0.16.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Aug 31 2022 Leigh Scott - 0.16.2-1 +- Update to 0.16.2 + +* Thu Jul 21 2022 Fedora Release Engineering - 0.15.1b-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.15.1b-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.15.1b-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 0.15.1b-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.15.1b-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Oct 15 2021 Pawel Winogrodzki - 0.15.1b-33 -- Initial CBL-Mariner import from Fedora 32 (license: MIT). + Initial CBL-Mariner import from Fedora 32 (license: MIT). * Wed Jan 29 2020 Fedora Release Engineering - 0.15.1b-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild @@ -228,10 +228,6 @@ install -Dpm 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/id3tag.pc - Provide mp3-cmdline virtual package and alternative. - Build shared library. -* Fri Apr 4 2003 Ville Skyttä - 0:0.14.2-0.fdr.1.b -- Update to current Fedora guidelines. -- Exclude %%{_libdir}/*.la. - * Thu Feb 20 2003 Ville Skyttä - 0.14.2b-1.fedora.1 - First Fedora release, based on Matthias Saou's work. @@ -247,3 +243,4 @@ install -Dpm 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/id3tag.pc * Mon Jan 28 2002 Bill Nottingham - split libmad off into a separate package + diff --git a/cgmanifest.json b/cgmanifest.json index d7915aa840f..35a795cc2ad 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -9711,8 +9711,8 @@ "type": "other", "other": { "name": "libid3tag", - "version": "0.15.1b", - "downloadUrl": "http://downloads.sourceforge.net/mad/libid3tag-0.15.1b.tar.gz" + "version": "0.16.3", + "downloadUrl":"https://codeberg.org/tenacityteam/libid3tag/archive/0.16.3.tar.gz" } } },