summaryrefslogtreecommitdiff
path: root/utils/skinupdater
diff options
context:
space:
mode:
Diffstat (limited to 'utils/skinupdater')
-rw-r--r--utils/skinupdater/skinupdater.c18
1 files changed, 15 insertions, 3 deletions
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 @@
28#define PUTCH(out, c) fprintf(out, "%c", c) 28#define PUTCH(out, c) fprintf(out, "%c", c)
29extern struct tag_info legal_tags[]; 29extern struct tag_info legal_tags[];
30 30
31char images_with_subimages[100];
32int image_count = 0;
31 33
32/** Command line setting **/ 34/** Command line setting **/
33bool is_mono_display = false; 35bool is_mono_display = false;
@@ -106,12 +108,14 @@ int parse_tag(FILE* out, const char* start, bool in_conditional)
106 } 108 }
107 else if (MATCH("xl")) 109 else if (MATCH("xl"))
108 { 110 {
111 char label = start[1];
109 PUTCH(out, '('); 112 PUTCH(out, '(');
110 int read = 1+dump_arg(out, start+1, 4, false); 113 int read = 1+dump_arg(out, start+1, 4, false);
111 len += read; 114 len += read;
112 start += read; 115 start += read;
113 if (*start>= '0' && *start <= '9') 116 if (*start>= '0' && *start <= '9')
114 { 117 {
118 images_with_subimages[image_count++] = label;
115 PUTCH(out, ','); 119 PUTCH(out, ',');
116 len += dump_arg(out, start, 1, false); 120 len += dump_arg(out, start, 1, false);
117 } 121 }
@@ -119,11 +123,19 @@ int parse_tag(FILE* out, const char* start, bool in_conditional)
119 } 123 }
120 else if (MATCH("xd")) 124 else if (MATCH("xd"))
121 { 125 {
122 /* NOTE: almost certainly needs work */ 126 char label = start[0];
127 int i=0;
128 while (i<image_count)
129 {
130 if (images_with_subimages[i] == label)
131 break;
132 i++;
133 }
123 PUTCH(out, '('); 134 PUTCH(out, '(');
124 PUTCH(out, *start++); len++; 135 PUTCH(out, *start++); len++;
125 if ((*start >= 'a' && *start <= 'z') || 136 if (i<image_count &&
126 (*start >= 'A' && *start <= 'Z')) 137 ((*start >= 'a' && *start <= 'z') ||
138 (*start >= 'A' && *start <= 'Z')))
127 { 139 {
128 PUTCH(out, *start); len++; 140 PUTCH(out, *start); len++;
129 } 141 }