summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-10-11 13:49:38 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-10-11 13:49:38 +0000
commit61c652601396c1fcb9a68b886faa76131aefc3b7 (patch)
treeca3f4e1ae67668db9fa16a80aa7d9d75eb6fb36e /apps/gui/wps_parser.c
parent4f8027470844990e591aeda5a7a2251ef955a440 (diff)
* Make %t stricter by aborting if a value is not given.
* Move the default value for %mv back into wps_parser.c where it belongs * Add the debug line for the %mv tag git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18773 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 96e8d6664c..fc207efb9b 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -802,6 +802,18 @@ static int parse_timeout(const char *wps_bufptr,
if (have_tenth == false)
val *= 10;
+ if (val == 0 && skip == 0)
+ {
+ /* decide what to do if no value was specified */
+ switch (token->type)
+ {
+ case WPS_TOKEN_SUBLINE_TIMEOUT:
+ return -1;
+ case WPS_TOKEN_BUTTON_VOLUME:
+ val = HZ;
+ break;
+ }
+ }
token->value.i = val;
return skip;