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.tar.gz rockbox-c6f234a4ccc917d16b21b89b00700391aaacca51.zip |
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 2754dba8ad..c6621b1e62 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -113,6 +113,7 @@ char* wps_get_genre(unsigned int genre) | |||
113 | static void wps_format(char* fmt) | 113 | static 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 | } |