diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-11-10 08:03:33 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-11-10 08:03:33 +0000 |
commit | 0dd7ea2d712944b21ede9f57bebd1009b03932e6 (patch) | |
tree | dc6065067aa862cc6a71c206b67554270fe507bd /firmware/id3.c | |
parent | ae221f140231cb2fd4833443d7810dfce03c606a (diff) | |
download | rockbox-0dd7ea2d712944b21ede9f57bebd1009b03932e6.tar.gz rockbox-0dd7ea2d712944b21ede9f57bebd1009b03932e6.zip |
Support building tagcache db natively on PC using the core of the
Rockbox tagcache database engine. Only host endian support at the
moment and no command line parameters. Mainly for developers for
debugging at the moment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/id3.c')
-rw-r--r-- | firmware/id3.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/id3.c b/firmware/id3.c index 470f4dc352..90b5b3bdee 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -457,9 +457,9 @@ static int unicode_munge(char* string, char* utf8buf, int *len) { | |||
457 | long tmp; | 457 | long tmp; |
458 | bool le = false; | 458 | bool le = false; |
459 | int i = 0; | 459 | int i = 0; |
460 | char *str = string; | 460 | unsigned char *str = (unsigned char *)string; |
461 | int templen = 0; | 461 | int templen = 0; |
462 | char* utf8 = utf8buf; | 462 | unsigned char* utf8 = (unsigned char *)utf8buf; |
463 | 463 | ||
464 | switch (str[0]) { | 464 | switch (str[0]) { |
465 | case 0x00: /* Type 0x00 is ordinary ISO 8859-1 */ | 465 | case 0x00: /* Type 0x00 is ordinary ISO 8859-1 */ |
@@ -467,7 +467,7 @@ static int unicode_munge(char* string, char* utf8buf, int *len) { | |||
467 | (*len)--; | 467 | (*len)--; |
468 | utf8 = iso_decode(str, utf8, -1, *len); | 468 | utf8 = iso_decode(str, utf8, -1, *len); |
469 | *utf8 = 0; | 469 | *utf8 = 0; |
470 | *len = utf8 - utf8buf; | 470 | *len = (unsigned long)utf8 - (unsigned long)utf8buf; |
471 | break; | 471 | break; |
472 | 472 | ||
473 | case 0x01: /* Unicode with or without BOM */ | 473 | case 0x01: /* Unicode with or without BOM */ |
@@ -524,7 +524,7 @@ static int unicode_munge(char* string, char* utf8buf, int *len) { | |||
524 | default: /* Plain old string */ | 524 | default: /* Plain old string */ |
525 | utf8 = iso_decode(str, utf8, -1, *len); | 525 | utf8 = iso_decode(str, utf8, -1, *len); |
526 | *utf8 = 0; | 526 | *utf8 = 0; |
527 | *len = utf8 - utf8buf; | 527 | *len = (unsigned long)utf8 - (unsigned long)utf8buf; |
528 | break; | 528 | break; |
529 | } | 529 | } |
530 | return 0; | 530 | return 0; |
@@ -571,7 +571,7 @@ static bool setid3v1title(int fd, struct mp3entry *entry) | |||
571 | case 1: | 571 | case 1: |
572 | case 2: | 572 | case 2: |
573 | /* convert string to utf8 */ | 573 | /* convert string to utf8 */ |
574 | utf8 = entry->id3v1buf[i]; | 574 | utf8 = (unsigned char *)entry->id3v1buf[i]; |
575 | utf8 = iso_decode(ptr, utf8, -1, 30); | 575 | utf8 = iso_decode(ptr, utf8, -1, 30); |
576 | /* make sure string is terminated */ | 576 | /* make sure string is terminated */ |
577 | *utf8 = 0; | 577 | *utf8 = 0; |
@@ -579,7 +579,7 @@ static bool setid3v1title(int fd, struct mp3entry *entry) | |||
579 | 579 | ||
580 | case 3: | 580 | case 3: |
581 | ptr[4] = 0; | 581 | ptr[4] = 0; |
582 | entry->year = atoi(ptr); | 582 | entry->year = atoi((char *)ptr); |
583 | break; | 583 | break; |
584 | 584 | ||
585 | case 4: | 585 | case 4: |