summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-09-07 12:34:10 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-09-07 12:34:10 +0000
commit25f0b3b777016f552205c56278f41a5a9693b0e1 (patch)
tree7d7318fab964c3187bfe932c6819ffcb14eb822d /apps/wps-display.c
parent94afb5422832537e35f9f745dd6edfd06c0dcf8c (diff)
Added support for %d4 to %d9 in the WPS format string.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2226 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 630546d455..5d6290d244 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -338,16 +338,13 @@ static char* get_tag(struct mp3entry* id3,
break;
case 'd': /* Directory path information */
- switch(tag[1])
{
- case '1': /* Parent folder */
- return get_dir(buf, buf_size, id3->path, 1);
-
- case '2': /* Parent of parent */
- return get_dir(buf, buf_size, id3->path, 2);
-
- case '3': /* Parent of parent of parent */
- return get_dir(buf, buf_size, id3->path, 3);
+ int level = tag[1] - '0';
+ /* d1 through d9 */
+ if ((0 < level) && (9 > level))
+ {
+ return get_dir(buf, buf_size, id3->path, level);
+ }
}
break;
}