libcfe  0.12.1
some useful C-functions
mp3info.h
Go to the documentation of this file.
1 /*
2  mp3info.h - Header files for MP3Info
3 
4  Copyright (C) 2000-2006 Cedric Tefft <cedric@phreaker.net>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 
20  ***************************************************************************
21 
22  This program is based in part on MP3Info 0.5 by Ricardo Cerqueira <rmc@rccn.net>
23 
24 */
25 
26 /* next 8 lines add by Martijn Goedhart 3 februari 2011 */
27 #ifdef VERSION
28 # define OLDVERSION VERSION
29 # undef VERSION
30 #endif
31 #ifdef COPYRIGHT
32 # define OLDCOPYRIGHT COPYRIGHT
33 # undef COPYRIGHT
34 #endif
35 
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <unistd.h>
39 #include <sys/stat.h>
40 #include <ctype.h>
41 #include <string.h>
42 #ifdef __WIN32__
43 #include "win32/curses.h"
44 #define uint unsigned int
45 #include <getopt.h>
46 #ifdef __MINGW32__
47 int truncate(const char *name, off_t length);
48 #endif
49 #else
50 #include <curses.h>
51 #endif
52 #include <signal.h>
53 #include <cfe/mp3info/mp3tech.h>
54 #include <cfe/mp3info/textfunc.h>
55 
56 
57 #define VERSION "MP3Info 0.8.5a"
58 #define COPYRIGHT "Copyright (C) 2006 Cedric Tefft and Ricardo Cerqueira"
59 #define MAXGENRE 147
60 #define GENREROWS 50
61 
62 
63 #ifdef __MAIN
64 char *typegenre [MAXGENRE+2] = {
65  "Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge",
66  "Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B",
67  "Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska",
68  "Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient",
69  "Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical",
70  "Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise",
71  "Alt. Rock","Bass","Soul","Punk","Space","Meditative",
72  "Instrumental Pop","Instrumental Rock","Ethnic","Gothic",
73  "Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance",
74  "Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40",
75  "Christian Rap","Pop/Funk","Jungle","Native American","Cabaret",
76  "New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi",
77  "Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical",
78  "Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk",
79  "Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic",
80  "Bluegrass","Avantgarde","Gothic Rock","Progressive Rock",
81  "Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band",
82  "Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson",
83  "Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus",
84  "Porn Groove","Satire","Slow Jam","Club","Tango","Samba",
85  "Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle",
86  "Duet","Punk Rock","Drum Solo","A Cappella","Euro-House",
87  "Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror",
88  "Indie","BritPop","Negerpunk","Polsk Punk","Beat",
89  "Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover",
90  "Contemporary Christian","Christian Rock","Merengue","Salsa",
91  "Thrash Metal","Anime","JPop","Synthpop",""
92 };
93 
94 int galphagenreindex[MAXGENRE+2] = {
95  148,123,74,73,34,99,40,20,26,145,90,
96  116,41,135,85,96,138,89,0,107,132,65,88,
97  104,102,97,136,61,141,1,32,128,112,57,140,
98  2,139,58,125,3,50,22,4,55,127,122,120,
99  98,52,48,124,25,54,84,81,115,80,119,5,
100  30,36,59,126,38,91,49,6,79,129,137,7,
101  35,100,131,19,46,47,33,146,29,8,63,86,
102  71,45,142,9,77,82,64,133,10,66,39,11,
103  103,12,75,134,53,62,13,109,117,23,108,92,
104  93,67,121,43,14,15,68,16,76,87,118,78,
105  17,143,114,110,69,21,111,95,105,42,37,24,
106  56,44,101,83,94,106,147,113,51,18,130,144,
107  60,70,31,72,27,28
108 };
109 
110 
112 
113 #ifdef __WIN32__
114  extern int opterr,optind,optopt,optreset;
115  extern char *optarg;
116 #endif
117 
118 #else
119  extern char *typegenre [MAXGENRE+2];
120  extern int alphagenreindex [MAXGENRE+1];
121  extern int galphagenreindex [MAXGENRE+2];
122 #endif
123 
124 void tagedit_curs(char *filename, int filenum, int fileoutof, id3tag *tag);
125 
126 
127 /* next 6 lines add by Martijn Goedhart 3 februari 2011 */
128 #define MP3INFO_VERSION VERSION
129 #undef VERSION
130 #define VERSION OLDVERSION
131 #undef OLDVERSION
132 #define MP3INFO_COPYRIGHT COPYRIGHT
133 #undef COPYRIGHT
134 #define COPYRIGHT OLDCOPYRIGHT
135 #undef OLDCOPYRIGHT
Definition: mp3tech.h:56
void tagedit_curs(char *filename, int filenum, int fileoutof, id3tag *tag)
int alphagenreindex[MAXGENRE+1]
char * typegenre[MAXGENRE+2]
#define MAXGENRE
Definition: mp3info.h:59
int galphagenreindex[MAXGENRE+2]