diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-11-04 13:46:37 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-11-04 13:46:37 +0000 |
| commit | c6f234a4ccc917d16b21b89b00700391aaacca51 (patch) | |
| tree | 5d5606e16bf406ba29e10ba903a8221fcffb8281 /apps | |
| parent | 1e781eab6c7177df33e016d01dbd78ae25b36e2f (diff) | |
| download | rockbox-c6f234a4ccc917d16b21b89b00700391aaacca51.zip rockbox-c6f234a4ccc917d16b21b89b00700391aaacca51.tar.gz rockbox-c6f234a4ccc917d16b21b89b00700391aaacca51.tar.bz2 rockbox-c6f234a4ccc917d16b21b89b00700391aaacca51.tar.xz | |
WPS files now supports comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4014 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/wps-display.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index 2754dba..c6621b1 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -113,6 +113,7 @@ char* wps_get_genre(unsigned int genre) static void wps_format(char* fmt) { char* buf = format_buffer; + char* start_of_line = format_buffer; int line = 0; strncpy(format_buffer, fmt, sizeof(format_buffer)); @@ -129,11 +130,15 @@ static void wps_format(char* fmt) case '\n': /* LF */ *buf = 0; + + if(*start_of_line != '#') /* A comment? */ + line++; - if (++line < MAX_LINES) + if (line <= MAX_LINES) { /* the next line starts on the next byte */ format_lines[line] = buf+1; + start_of_line = format_lines[line]; } break; } |