summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 9f136ffa0c..159f0abda6 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -68,9 +68,11 @@
68#ifdef HAVE_LCD_CHARCELLS 68#ifdef HAVE_LCD_CHARCELLS
69static unsigned char wps_progress_pat[8]={0,0,0,0,0,0,0,0}; 69static unsigned char wps_progress_pat[8]={0,0,0,0,0,0,0,0};
70static bool full_line_progressbar=0; 70static bool full_line_progressbar=0;
71static bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count); 71static bool draw_player_progress(const struct mp3entry* id3,
72 int ff_rewwind_count);
72static void draw_player_fullbar(char* buf, int buf_size, 73static void draw_player_fullbar(char* buf, int buf_size,
73 struct mp3entry* id3, int ff_rewwind_count); 74 const struct mp3entry* id3,
75 int ff_rewwind_count);
74static char map_fullbar_char(char ascii_val); 76static char map_fullbar_char(char ascii_val);
75#endif 77#endif
76 78
@@ -86,7 +88,7 @@ bool wps_time_countup = true;
86static bool wps_loaded = false; 88static bool wps_loaded = false;
87 89
88/* Set format string to use for WPS, splitting it into lines */ 90/* Set format string to use for WPS, splitting it into lines */
89static void wps_format(char* fmt) 91static void wps_format(const char* fmt)
90{ 92{
91 char* buf = format_buffer; 93 char* buf = format_buffer;
92 char* start_of_line = format_buffer; 94 char* start_of_line = format_buffer;
@@ -170,7 +172,7 @@ void wps_reset(void)
170 memset(&format_buffer, 0, sizeof format_buffer); 172 memset(&format_buffer, 0, sizeof format_buffer);
171} 173}
172 174
173bool wps_load(char* file, bool display) 175bool wps_load(const char* file, bool display)
174{ 176{
175 int i, s; 177 int i, s;
176 char buffer[FORMAT_BUFFER_SIZE]; 178 char buffer[FORMAT_BUFFER_SIZE];
@@ -256,10 +258,10 @@ static void format_time(char* buf, int buf_size, int time)
256 * 258 *
257 * Returns buf if the desired level was found, NULL otherwise. 259 * Returns buf if the desired level was found, NULL otherwise.
258 */ 260 */
259static char* get_dir(char* buf, int buf_size, char* path, int level) 261static char* get_dir(char* buf, int buf_size, const char* path, int level)
260{ 262{
261 char* sep; 263 const char* sep;
262 char* last_sep; 264 const char* last_sep;
263 int len; 265 int len;
264 266
265 sep = path + strlen(path); 267 sep = path + strlen(path);
@@ -304,7 +306,7 @@ static char* get_dir(char* buf, int buf_size, char* path, int level)
304 */ 306 */
305static char* get_tag(struct mp3entry* cid3, 307static char* get_tag(struct mp3entry* cid3,
306 struct mp3entry* nid3, 308 struct mp3entry* nid3,
307 char* tag, 309 const char* tag,
308 char* buf, 310 char* buf,
309 int buf_size, 311 int buf_size,
310 unsigned char* tag_len, 312 unsigned char* tag_len,
@@ -622,7 +624,7 @@ static char* get_tag(struct mp3entry* cid3,
622 * 624 *
623 * Returns the new position in fmt. 625 * Returns the new position in fmt.
624 */ 626 */
625static char* skip_conditional(char* fmt, bool to_else) 627static const char* skip_conditional(const char* fmt, bool to_else)
626{ 628{
627 int level = 1; 629 int level = 1;
628 630
@@ -693,7 +695,7 @@ static void format_display(char* buf,
693 int buf_size, 695 int buf_size,
694 struct mp3entry* id3, 696 struct mp3entry* id3,
695 struct mp3entry* nid3, /* next song's id3 */ 697 struct mp3entry* nid3, /* next song's id3 */
696 char* fmt, 698 const char* fmt,
697 unsigned char* subline_time_mult, 699 unsigned char* subline_time_mult,
698 unsigned char* flags) 700 unsigned char* flags)
699{ 701{
@@ -1051,7 +1053,8 @@ bool wps_display(struct mp3entry* id3,
1051} 1053}
1052 1054
1053#ifdef HAVE_LCD_CHARCELLS 1055#ifdef HAVE_LCD_CHARCELLS
1054static bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) 1056static bool draw_player_progress(const struct mp3entry* id3,
1057 int ff_rewwind_count)
1055{ 1058{
1056 char player_progressbar[7]; 1059 char player_progressbar[7];
1057 char binline[36]; 1060 char binline[36];
@@ -1087,7 +1090,8 @@ static bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
1087} 1090}
1088 1091
1089static void draw_player_fullbar(char* buf, int buf_size, 1092static void draw_player_fullbar(char* buf, int buf_size,
1090 struct mp3entry* id3, int ff_rewwind_count) 1093 const struct mp3entry* id3,
1094 int ff_rewwind_count)
1091{ 1095{
1092 int i,j,lcd_char_pos; 1096 int i,j,lcd_char_pos;
1093 1097