summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-09 10:56:54 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-09 10:56:54 +0000
commit0f6b3796d6143f36300e7f3136ba4ad73ab41913 (patch)
treecf8ce408c184dbfcada9f78015df8c686e7b3616 /apps
parentc1d7708dfa2ba5ad8417aa0513b0b052fdfece4d (diff)
downloadrockbox-0f6b3796d6143f36300e7f3136ba4ad73ab41913.tar.gz
rockbox-0f6b3796d6143f36300e7f3136ba4ad73ab41913.zip
long policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5863 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/bookmark.c27
-rw-r--r--apps/filetypes.c12
2 files changed, 20 insertions, 19 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index 969371eeeb..e96561319b 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -1,4 +1,4 @@
1 /*************************************************************************** 1/***************************************************************************
2 * __________ __ ___. 2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
@@ -6,7 +6,7 @@
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * 8 *
9 * Copyright (C) 2003 by Benjamin Metzler 9 * Copyright (C)2003 by Benjamin Metzler
10 * 10 *
11 * All files in this archive are subject to the GNU General Public License. 11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement. 12 * See the file COPYING in the source tree root for full license agreement.
@@ -70,7 +70,7 @@ static bool parse_bookmark(const char *bookmark,
70 int *resume_first_index, 70 int *resume_first_index,
71 char* resume_file, 71 char* resume_file,
72 unsigned int resume_file_size, 72 unsigned int resume_file_size,
73 int* ms, 73 long* ms,
74 int * repeat_mode, 74 int * repeat_mode,
75 bool *shuffle, 75 bool *shuffle,
76 char* file_name); 76 char* file_name);
@@ -778,7 +778,7 @@ static void display_bookmark(const char* bookmark,
778 int bookmark_count) 778 int bookmark_count)
779{ 779{
780 int resume_index = 0; 780 int resume_index = 0;
781 int ms = 0; 781 long ms = 0;
782 int repeat_mode = 0; 782 int repeat_mode = 0;
783 bool playlist_shuffle = false; 783 bool playlist_shuffle = false;
784 int len; 784 int len;
@@ -834,19 +834,20 @@ static void display_bookmark(const char* bookmark,
834 /* elapsed time*/ 834 /* elapsed time*/
835 if ( ms < 3600000 ) 835 if ( ms < 3600000 )
836 { 836 {
837 snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d:%02d", 837 snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %ld:%02d",
838 str(LANG_BOOKMARK_SELECT_TIME_TEXT), 838 str(LANG_BOOKMARK_SELECT_TIME_TEXT),
839 ms / 60000, 839 ms / 60000,
840 ms % 60000 / 1000); 840 (unsigned int)(ms % 60000) / 1000);
841 /* unsigned int: hinting for 16bits archs */
841 } 842 }
842 else 843 else
843 { 844 {
844 snprintf(global_temp_buffer, sizeof(global_temp_buffer), 845 snprintf(global_temp_buffer, sizeof(global_temp_buffer),
845 "%s: %d:%02d:%02d", 846 "%s: %ld:%02ld:%02d",
846 str(LANG_BOOKMARK_SELECT_TIME_TEXT), 847 str(LANG_BOOKMARK_SELECT_TIME_TEXT),
847 ms / 3600000, 848 ms / 3600000,
848 ms % 3600000 / 60000, 849 ms % 3600000 / 60000,
849 ms % 60000 / 1000); 850 (unsigned int)(ms % 60000) / 1000);
850 } 851 }
851 lcd_puts_scroll(0, 3, global_temp_buffer); 852 lcd_puts_scroll(0, 3, global_temp_buffer);
852 853
@@ -900,7 +901,7 @@ static void say_bookmark(const char* bookmark,
900 int bookmark_id) 901 int bookmark_id)
901{ 902{
902 int resume_index; 903 int resume_index;
903 int ms; 904 long ms;
904 char dir[MAX_PATH]; 905 char dir[MAX_PATH];
905 bool enqueue = false; /* only the first voice is not queued */ 906 bool enqueue = false; /* only the first voice is not queued */
906 907
@@ -987,7 +988,7 @@ static bool parse_bookmark(const char *bookmark,
987 int *resume_first_index, 988 int *resume_first_index,
988 char* resume_file, 989 char* resume_file,
989 unsigned int resume_file_size, 990 unsigned int resume_file_size,
990 int* ms, 991 long* ms,
991 int * repeat_mode, bool *shuffle, 992 int * repeat_mode, bool *shuffle,
992 char* file_name) 993 char* file_name)
993{ 994{
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 09090c30d4..2788d3c151 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -209,8 +209,8 @@ int filetype_get_attr(const char* name)
209 strlen(exttypes[i].extension)], 209 strlen(exttypes[i].extension)],
210 exttypes[i].extension)) 210 exttypes[i].extension))
211 { 211 {
212 return ((((unsigned int)exttypes[i].type - 212 return ((((unsigned long)exttypes[i].type -
213 (unsigned int)&filetypes[0]) / 213 (unsigned long)&filetypes[0]) /
214 sizeof(struct file_type)) << 8); 214 sizeof(struct file_type)) << 8);
215 } 215 }
216 } 216 }
@@ -594,8 +594,8 @@ static char* string2icon(const char* str)
594 return NULL; 594 return NULL;
595 595
596 if ((sizeof(string_buffer) + 596 if ((sizeof(string_buffer) +
597 (unsigned int) string_buffer - 597 (unsigned long) string_buffer -
598 (unsigned int) next_free_string) < ICON_LENGTH) 598 (unsigned long) next_free_string) < ICON_LENGTH)
599 { 599 {
600 splash(HZ,true,str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); 600 splash(HZ,true,str(LANG_FILETYPES_STRING_BUFFER_EMPTY));
601 return NULL; 601 return NULL;
@@ -643,8 +643,8 @@ static char* get_string(const char* str)
643 return NULL; 643 return NULL;
644 644
645 if (l <= (sizeof(string_buffer) + 645 if (l <= (sizeof(string_buffer) +
646 (unsigned int) string_buffer - 646 (unsigned long) string_buffer -
647 (unsigned int) next_free_string)) 647 (unsigned long) next_free_string))
648 { 648 {
649 strcpy(next_free_string,str); 649 strcpy(next_free_string,str);
650 cp=next_free_string; 650 cp=next_free_string;