Made mp3entry a struct, not a type
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1182 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f224f0b8e8
commit
ef15d9983a
4 changed files with 9 additions and 11 deletions
|
@ -42,7 +42,7 @@
|
|||
void playtune(char *filename)
|
||||
{
|
||||
static char mfile[256];
|
||||
mp3entry mp3;
|
||||
struct mp3entry mp3;
|
||||
bool good=1;
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
char buffer[256];
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
/* demonstrates showing different formats from playtune */
|
||||
void wps_show_play(char* filename)
|
||||
{
|
||||
mp3entry mp3;
|
||||
struct mp3entry mp3;
|
||||
mp3info(&mp3,filename);
|
||||
|
||||
switch ( global_settings.wps_display ) {
|
||||
|
|
|
@ -110,7 +110,7 @@ stripspaces(char *buffer)
|
|||
* Returns: true if a title was found and created, else false
|
||||
*/
|
||||
static bool
|
||||
setid3v1title(int fd, mp3entry *entry)
|
||||
setid3v1title(int fd, struct mp3entry *entry)
|
||||
{
|
||||
char buffer[31];
|
||||
int offsets[3] = {-95,-65,-125};
|
||||
|
@ -155,7 +155,7 @@ setid3v1title(int fd, mp3entry *entry)
|
|||
* Returns: true if a title was found and created, else false
|
||||
*/
|
||||
static void
|
||||
setid3v2title(int fd, mp3entry *entry)
|
||||
setid3v2title(int fd, struct mp3entry *entry)
|
||||
{
|
||||
unsigned int minframesize;
|
||||
int size;
|
||||
|
@ -345,7 +345,7 @@ getid3v1len(int fd)
|
|||
* -1 means that it couldn't be calculated
|
||||
*/
|
||||
static int
|
||||
getsonglength(int fd, mp3entry *entry)
|
||||
getsonglength(int fd, struct mp3entry *entry)
|
||||
{
|
||||
unsigned long header=0;
|
||||
unsigned char tmp;
|
||||
|
@ -480,14 +480,14 @@ getsonglength(int fd, mp3entry *entry)
|
|||
* Returns: void
|
||||
*/
|
||||
bool
|
||||
mp3info(mp3entry *entry, char *filename)
|
||||
mp3info(struct mp3entry *entry, char *filename)
|
||||
{
|
||||
int fd;
|
||||
fd = open(filename, O_RDONLY);
|
||||
if(-1 == fd)
|
||||
return true;
|
||||
|
||||
memset(entry, 0, sizeof(mp3entry));
|
||||
memset(entry, 0, sizeof(struct mp3entry));
|
||||
|
||||
entry->path = filename;
|
||||
|
||||
|
@ -524,7 +524,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
int i;
|
||||
for(i=1; i<argc; i++) {
|
||||
mp3entry mp3;
|
||||
struct mp3entry mp3;
|
||||
if(mp3info(&mp3, argv[i])) {
|
||||
printf("Failed to get %s\n", argv[i]);
|
||||
return 0;
|
||||
|
|
|
@ -38,8 +38,6 @@ struct mp3entry {
|
|||
char id3v1buf[3][32];
|
||||
};
|
||||
|
||||
typedef struct mp3entry mp3entry;
|
||||
|
||||
bool mp3info(mp3entry *entry, char *filename);
|
||||
bool mp3info(struct mp3entry *entry, char *filename);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue