diff options
author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-09 10:56:54 +0000 |
---|---|---|
committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-09 10:56:54 +0000 |
commit | 0f6b3796d6143f36300e7f3136ba4ad73ab41913 (patch) | |
tree | cf8ce408c184dbfcada9f78015df8c686e7b3616 | |
parent | c1d7708dfa2ba5ad8417aa0513b0b052fdfece4d (diff) | |
download | rockbox-0f6b3796d6143f36300e7f3136ba4ad73ab41913.tar.gz rockbox-0f6b3796d6143f36300e7f3136ba4ad73ab41913.zip |
long policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5863 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/bookmark.c | 27 | ||||
-rw-r--r-- | apps/filetypes.c | 12 | ||||
-rw-r--r-- | firmware/id3.c | 22 |
3 files changed, 31 insertions, 30 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; |
diff --git a/firmware/id3.c b/firmware/id3.c index 4297c8ba70..d8f7c0db7b 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -41,15 +41,15 @@ | |||
41 | #include "mp3data.h" | 41 | #include "mp3data.h" |
42 | #include "system.h" | 42 | #include "system.h" |
43 | 43 | ||
44 | #define UNSYNC(b0,b1,b2,b3) (((b0 & 0x7F) << (3*7)) | \ | 44 | #define UNSYNC(b0,b1,b2,b3) (((long)(b0 & 0x7F) << (3*7)) | \ |
45 | ((b1 & 0x7F) << (2*7)) | \ | 45 | ((long)(b1 & 0x7F) << (2*7)) | \ |
46 | ((b2 & 0x7F) << (1*7)) | \ | 46 | ((long)(b2 & 0x7F) << (1*7)) | \ |
47 | ((b3 & 0x7F) << (0*7))) | 47 | ((long)(b3 & 0x7F) << (0*7))) |
48 | 48 | ||
49 | #define BYTES2INT(b0,b1,b2,b3) (((b0 & 0xFF) << (3*8)) | \ | 49 | #define BYTES2INT(b0,b1,b2,b3) (((long)(b0 & 0xFF) << (3*8)) | \ |
50 | ((b1 & 0xFF) << (2*8)) | \ | 50 | ((long)(b1 & 0xFF) << (2*8)) | \ |
51 | ((b2 & 0xFF) << (1*8)) | \ | 51 | ((long)(b2 & 0xFF) << (1*8)) | \ |
52 | ((b3 & 0xFF) << (0*8))) | 52 | ((long)(b3 & 0xFF) << (0*8))) |
53 | 53 | ||
54 | static const char* const genres[] = { | 54 | static const char* const genres[] = { |
55 | "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", | 55 | "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", |
@@ -171,7 +171,7 @@ static int unsynchronize(char* tag, int len, bool *ff_found) | |||
171 | wp++; | 171 | wp++; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | return (int)wp - (int)tag; | 174 | return (long)wp - (long)tag; |
175 | } | 175 | } |
176 | 176 | ||
177 | static int unsynchronize_frame(char* tag, int len) | 177 | static int unsynchronize_frame(char* tag, int len) |
@@ -292,7 +292,7 @@ static const struct tag_resolver taglist[] = { | |||
292 | (for valid 8-bit ASCII characters). If it's not unicode, we leave | 292 | (for valid 8-bit ASCII characters). If it's not unicode, we leave |
293 | it alone. At some point we should fully support unicode strings */ | 293 | it alone. At some point we should fully support unicode strings */ |
294 | static int unicode_munge(char** string, int *len) { | 294 | static int unicode_munge(char** string, int *len) { |
295 | int tmp; | 295 | long tmp; |
296 | bool le = false; | 296 | bool le = false; |
297 | int i; | 297 | int i; |
298 | char *str = *string; | 298 | char *str = *string; |
@@ -460,7 +460,7 @@ static void setid3v2title(int fd, struct mp3entry *entry) | |||
460 | { | 460 | { |
461 | int minframesize; | 461 | int minframesize; |
462 | int size; | 462 | int size; |
463 | int bufferpos = 0, totframelen, framelen; | 463 | long bufferpos = 0, totframelen, framelen; |
464 | char header[10]; | 464 | char header[10]; |
465 | char tmp[4]; | 465 | char tmp[4]; |
466 | unsigned char version; | 466 | unsigned char version; |