From 04130c2c7ea49dca77144fbdab29262156e29db1 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 29 May 2010 09:35:05 +0000 Subject: be smarter about %xd so it only eats 2 letters if that image has subimages git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26371 a1c6a512-1295-4272-9138-f99709370657 --- utils/skinupdater/skinupdater.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c index 9329b9a9f0..755c912fa3 100644 --- a/utils/skinupdater/skinupdater.c +++ b/utils/skinupdater/skinupdater.c @@ -28,6 +28,8 @@ #define PUTCH(out, c) fprintf(out, "%c", c) extern struct tag_info legal_tags[]; +char images_with_subimages[100]; +int image_count = 0; /** Command line setting **/ bool is_mono_display = false; @@ -106,12 +108,14 @@ int parse_tag(FILE* out, const char* start, bool in_conditional) } else if (MATCH("xl")) { + char label = start[1]; PUTCH(out, '('); int read = 1+dump_arg(out, start+1, 4, false); len += read; start += read; if (*start>= '0' && *start <= '9') { + images_with_subimages[image_count++] = label; PUTCH(out, ','); len += dump_arg(out, start, 1, false); } @@ -119,11 +123,19 @@ int parse_tag(FILE* out, const char* start, bool in_conditional) } else if (MATCH("xd")) { - /* NOTE: almost certainly needs work */ + char label = start[0]; + int i=0; + while (i= 'a' && *start <= 'z') || - (*start >= 'A' && *start <= 'Z')) + if (i= 'a' && *start <= 'z') || + (*start >= 'A' && *start <= 'Z'))) { PUTCH(out, *start); len++; } -- cgit v1.2.3