diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-02-08 11:09:55 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-02-08 11:09:55 +0000 |
commit | 5a55772201829dc0055cc8d3022cc475ccbc2643 (patch) | |
tree | 65440f5944388c9db3a439df7f37a75e5431709d /apps/metadata/metadata_common.c | |
parent | eda5ed06244abba643e09a775d71542d91691d4d (diff) |
Small code reuse improvement
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19943 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/metadata_common.c')
-rw-r--r-- | apps/metadata/metadata_common.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c index 94ff212cea..09f0f94a88 100644 --- a/apps/metadata/metadata_common.c +++ b/apps/metadata/metadata_common.c @@ -29,6 +29,7 @@ #include "metadata_common.h" #include "metadata_parsers.h" #include "replaygain.h" +#include "misc.h" /* Skip an ID3v2 tag if it can be found. We assume the tag is located at the * start of the file, which should be true in all cases where we need to skip it. @@ -173,16 +174,6 @@ long get_slong(void* buf) return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); } -static char* skip_space(char* str) -{ - while (isspace(*str)) - { - str++; - } - - return str; -} - unsigned long get_itunes_int32(char* value, int count) { static const char hexdigits[] = "0123456789ABCDEF"; @@ -191,7 +182,7 @@ unsigned long get_itunes_int32(char* value, int count) while (count-- > 0) { - value = skip_space(value); + value = skip_whitespace(value); while (*value && !isspace(*value)) { @@ -199,7 +190,7 @@ unsigned long get_itunes_int32(char* value, int count) } } - value = skip_space(value); + value = skip_whitespace(value); while (*value && ((c = strchr(hexdigits, toupper(*value))) != NULL)) { |