summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/wps-display.c7
-rw-r--r--docs/CUSTOM_WPS_FORMAT3
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 2754dba8ad..c6621b1e62 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -113,6 +113,7 @@ char* wps_get_genre(unsigned int genre)
113static void wps_format(char* fmt) 113static void wps_format(char* fmt)
114{ 114{
115 char* buf = format_buffer; 115 char* buf = format_buffer;
116 char* start_of_line = format_buffer;
116 int line = 0; 117 int line = 0;
117 118
118 strncpy(format_buffer, fmt, sizeof(format_buffer)); 119 strncpy(format_buffer, fmt, sizeof(format_buffer));
@@ -129,11 +130,15 @@ static void wps_format(char* fmt)
129 130
130 case '\n': /* LF */ 131 case '\n': /* LF */
131 *buf = 0; 132 *buf = 0;
133
134 if(*start_of_line != '#') /* A comment? */
135 line++;
132 136
133 if (++line < MAX_LINES) 137 if (line <= MAX_LINES)
134 { 138 {
135 /* the next line starts on the next byte */ 139 /* the next line starts on the next byte */
136 format_lines[line] = buf+1; 140 format_lines[line] = buf+1;
141 start_of_line = format_lines[line];
137 } 142 }
138 break; 143 break;
139 } 144 }
diff --git a/docs/CUSTOM_WPS_FORMAT b/docs/CUSTOM_WPS_FORMAT
index 557402bc26..9a11c398cd 100644
--- a/docs/CUSTOM_WPS_FORMAT
+++ b/docs/CUSTOM_WPS_FORMAT
@@ -8,6 +8,7 @@ Description / General Info
8* After editing the .wps file, "play" it to make it take effect. 8* After editing the .wps file, "play" it to make it take effect.
9* The file may be 2 lines long for the Player, and 10 lines for the Recorder. 9* The file may be 2 lines long for the Player, and 10 lines for the Recorder.
10* All characters not preceded by % are displayed as typed. 10* All characters not preceded by % are displayed as typed.
11* A line beginning with # is a comment
11 12
12File Location 13File Location
13------------- 14-------------
@@ -100,11 +101,13 @@ Default
100If you haven't selected a .wps file in the .rockbox directory, you get the 101If you haven't selected a .wps file in the .rockbox directory, you get the
101hardcoded wps layout. The default WPS screen is for player: 102hardcoded wps layout. The default WPS screen is for player:
102 103
104# Default WPS for Player
103%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1> 105%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>
104%pc%?ps<*|/>%pt 106%pc%?ps<*|/>%pt
105 107
106and for recorder: 108and for recorder:
107 109
110# Default WPS for Recorder
108%s%?it<%?in<%in. |>%it|%fn> 111%s%?it<%?in<%in. |>%it|%fn>
109%s%?ia<%ia|%?d2<%d2|(root)>> 112%s%?ia<%ia|%?d2<%d2|(root)>>
110%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|> 113%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>