summaryrefslogtreecommitdiffstats
path: root/utils/skinupdater/skinupdater.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-02 08:18:47 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-02 08:18:47 +0000
commitbbe6c5a5e20b95eff80881cee1277a0e259cbcd4 (patch)
tree38c02ad00685aeb549cb7285c86e72ed796d5157 /utils/skinupdater/skinupdater.c
parent496bcf39c7070ad35c73610d2f2dd492cae8b94c (diff)
downloadrockbox-bbe6c5a5e20b95eff80881cee1277a0e259cbcd4.tar.gz
rockbox-bbe6c5a5e20b95eff80881cee1277a0e259cbcd4.tar.bz2
rockbox-bbe6c5a5e20b95eff80881cee1277a0e259cbcd4.zip
we need to escape more chars now, so fix that. test skins with this update parse correctly with the themeditor :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26468 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/skinupdater/skinupdater.c')
-rw-r--r--utils/skinupdater/skinupdater.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c
index 7e3d14e237..537c53ffbd 100644
--- a/utils/skinupdater/skinupdater.c
+++ b/utils/skinupdater/skinupdater.c
@@ -36,8 +36,6 @@ bool is_mono_display = false;
bool use_new_vp_tags = true;
-
-
/* dump "count" args to output replacing '|' with ',' except after the last count.
* return the amount of chars read. (start+return will be after the last | )
*/
@@ -56,6 +54,10 @@ int dump_arg(FILE* out, const char* start, int count, bool close)
}
count--;
} else {
+ if (find_escape_character(start[l]))
+ {
+ PUTCH(out, '%');
+ }
PUTCH(out, start[l]);
}
l++;
@@ -264,6 +266,9 @@ top:
case '>':
case ';':
case '#':
+ case ')':
+ case '(':
+ case ',':
PUTCH(out, *in++);
goto top;
break;
@@ -291,6 +296,14 @@ top:
level--;
PUTCH(out, *in++);
}
+ else if (*in == '|')
+ {
+ if (level == 0)
+ {
+ PUTCH(out, '%');
+ }
+ PUTCH(out, *in++);
+ }
else if (*in == '#')
{
while (*in && *in != '\n')
@@ -300,6 +313,10 @@ top:
}
else
{
+ if (find_escape_character(*in))
+ {
+ PUTCH(out, '%');
+ }
PUTCH(out, *in++);
}
}