1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jonathan Gordon 2010-06-02 08:18:47 +00:00
parent 496bcf39c7
commit bbe6c5a5e2

View file

@ -36,8 +36,6 @@ bool is_mono_display = false;
bool use_new_vp_tags = true; bool use_new_vp_tags = true;
/* dump "count" args to output replacing '|' with ',' except after the last count. /* 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 | ) * 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--; count--;
} else { } else {
if (find_escape_character(start[l]))
{
PUTCH(out, '%');
}
PUTCH(out, start[l]); PUTCH(out, start[l]);
} }
l++; l++;
@ -264,6 +266,9 @@ top:
case '>': case '>':
case ';': case ';':
case '#': case '#':
case ')':
case '(':
case ',':
PUTCH(out, *in++); PUTCH(out, *in++);
goto top; goto top;
break; break;
@ -291,6 +296,14 @@ top:
level--; level--;
PUTCH(out, *in++); PUTCH(out, *in++);
} }
else if (*in == '|')
{
if (level == 0)
{
PUTCH(out, '%');
}
PUTCH(out, *in++);
}
else if (*in == '#') else if (*in == '#')
{ {
while (*in && *in != '\n') while (*in && *in != '\n')
@ -300,6 +313,10 @@ top:
} }
else else
{ {
if (find_escape_character(*in))
{
PUTCH(out, '%');
}
PUTCH(out, *in++); PUTCH(out, *in++);
} }
} }