|
Rockbox mail archiveSubject: [PATCH] %d4[PATCH] %d4
From: Magnus Holmgren <lear_at_algonet.se>
Date: Sat, 07 Sep 2002 10:04:57 +0200 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 _at__at_ -338,16 +338,14 _at__at_ 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; } Received on 2002-09-07 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |