Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [PATCH] %d4
From: Magnus Holmgren (lear_at_algonet.se)
Date: 2002-09-07


Hi,

The attached patch adds support for %d4 to %d9 in the WPS format string.

-- 
Magnus Holmgren

Index: apps/wps-display.c
===================================================================
RCS file: /cvsroot/rockbox/apps/wps-display.c,v
retrieving revision 1.17
diff -u -b -r1.17 wps-display.c
--- apps/wps-display.c 6 Sep 2002 23:17:02 -0000 1.17
+++ apps/wps-display.c 7 Sep 2002 07:58:59 -0000
@@ -338,16 +338,14 @@
             break;
     
         case 'd': /* Directory path information */
- switch(tag[1])
             {
- case '1': /* Parent folder */
- return get_dir(buf, buf_size, id3->path, 1);
+ int level = tag[1] - '0';
 
- 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);
+ /* d1 through d9 */
+ if ((0 < level) && (9 > level))
+ {
+ return get_dir(buf, buf_size, id3->path, level);
+ }
             }
             break;
     }



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa