summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobert Hak <adiamas@rockbox.org>2002-08-23 11:31:19 +0000
committerRobert Hak <adiamas@rockbox.org>2002-08-23 11:31:19 +0000
commitf27fecb0768caea46ad72f435f5e5c4e808f3fbf (patch)
tree2727c1b75c58286812d6bdcf371f39a499142830 /apps
parentd58dab8dd8bbf31164f81bf69b31d547e4080f92 (diff)
downloadrockbox-f27fecb0768caea46ad72f435f5e5c4e808f3fbf.tar.gz
rockbox-f27fecb0768caea46ad72f435f5e5c4e808f3fbf.zip
minor style fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1946 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/wps.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 224902c361..10fad7b1a4 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -107,13 +107,13 @@ static void draw_screen(struct mp3entry* id3)
107 szTok = strtok_r(szBuff, "/", &end); 107 szTok = strtok_r(szBuff, "/", &end);
108 szTok = strtok_r(NULL, "/", &end); 108 szTok = strtok_r(NULL, "/", &end);
109 109
110 // Assume path format of: Genre/Artist/Album/Mp3_file 110 /* Assume path format of: Genre/Artist/Album/Mp3_file */
111 strncpy(szArtist,szTok,sizeof(szArtist)); 111 strncpy(szArtist,szTok,sizeof(szArtist));
112 szArtist[sizeof(szArtist)-1] = 0; 112 szArtist[sizeof(szArtist)-1] = 0;
113 szDelimit = strrchr(id3->path, ch); 113 szDelimit = strrchr(id3->path, ch);
114 lcd_puts(0, 0, szArtist?szArtist:"<nothing>"); 114 lcd_puts(0, 0, szArtist?szArtist:"<nothing>");
115 115
116 // removes the .mp3 from the end of the display buffer 116 /* removes the .mp3 from the end of the display buffer */
117 szPeriod = strrchr(szDelimit, '.'); 117 szPeriod = strrchr(szDelimit, '.');
118 if (szPeriod != NULL) 118 if (szPeriod != NULL)
119 *szPeriod = 0; 119 *szPeriod = 0;
@@ -160,7 +160,8 @@ static void draw_screen(struct mp3entry* id3)
160 snprintf(buffer, sizeof(buffer), "%d kbit (avg)", 160 snprintf(buffer, sizeof(buffer), "%d kbit (avg)",
161 id3->bitrate); 161 id3->bitrate);
162 else 162 else
163 snprintf(buffer, sizeof(buffer), "%d kbit", id3->bitrate); 163 snprintf(buffer, sizeof(buffer), "%d kbit",
164 id3->bitrate);
164 165
165 lcd_puts(0, l++, buffer); 166 lcd_puts(0, l++, buffer);
166 snprintf(buffer,sizeof(buffer), "%d Hz", id3->frequency); 167 snprintf(buffer,sizeof(buffer), "%d Hz", id3->frequency);
@@ -234,6 +235,7 @@ int wps_load_custom_config(void)
234 235
235 buffer[0]=0; 236 buffer[0]=0;
236 lcd_stop_scroll(); 237 lcd_stop_scroll();
238
237 fd = open("/wps.config", O_RDONLY); 239 fd = open("/wps.config", O_RDONLY);
238 if(-1 == fd) 240 if(-1 == fd)
239 { 241 {
@@ -509,7 +511,7 @@ void display_volume_level(int vol_level)
509 char buffer[32]; 511 char buffer[32];
510 512
511 lcd_stop_scroll(); 513 lcd_stop_scroll();
512 snprintf(buffer,sizeof(buffer),"Vol: %d %s ", vol_level * 2, "%"); 514 snprintf(buffer,sizeof(buffer),"Vol: %d %% ", vol_level * 2);
513 515
514#ifdef HAVE_LCD_CHARCELLS 516#ifdef HAVE_LCD_CHARCELLS
515 lcd_puts(0, 0, buffer); 517 lcd_puts(0, 0, buffer);
@@ -1113,7 +1115,8 @@ int wps_show(void)
1113 if ( id3 && 1115 if ( id3 &&
1114 global_settings.resume && 1116 global_settings.resume &&
1115 global_settings.resume_offset != id3->offset ) { 1117 global_settings.resume_offset != id3->offset ) {
1116 DEBUGF("R%X,%X (%X)\n",global_settings.resume_offset,id3->offset,id3); 1118 DEBUGF("R%X,%X (%X)\n", global_settings.resume_offset,
1119 id3->offset,id3);
1117 global_settings.resume_index = id3->index; 1120 global_settings.resume_index = id3->index;
1118 global_settings.resume_offset = id3->offset; 1121 global_settings.resume_offset = id3->offset;
1119 settings_save(); 1122 settings_save();