1
0
Fork 0
forked from len0rd/rockbox

Start using the new endian conversion system outside tagcache also to simplify code.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12309 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2007-02-14 19:20:13 +00:00
parent 9d5f73cd85
commit 7a395a23bf
3 changed files with 27 additions and 90 deletions

View file

@ -17,6 +17,7 @@
*
****************************************************************************/
#include <ctype.h>
#include <string.h>
#include <inttypes.h>
#include "structec.h"
@ -82,9 +83,14 @@ void structec_convert(void *structure, const char *ecinst,
break;
}
/* This should be never reached. */
/* Skip N bytes, idea taken from metadata.c */
default:
{
if (isdigit(*ecinst_ring))
buf += (*ecinst_ring - '0');
break;
}
}
ecinst_ring++;
@ -114,7 +120,9 @@ size_t structec_size(const char *ecinst)
case 'c': size += 1; break;
case 's': size += 2; break;
case 'l': size += 4; break;
default: break;
default:
if (isdigit(*ecinst))
size += (*ecinst - '0');
}
} while (*(++ecinst) != '\0');