diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-10-21 22:42:01 +0200 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2021-10-21 22:42:01 +0200 |
commit | 1697b1369353ecfbd8c8b640e35b908e01126fc4 (patch) | |
tree | 658f636ce8def9fd2716ff823b2d2a420ebb2894 | |
parent | cf96a4d386324884ac9a69da66aabd9e262c7078 (diff) | |
download | rockbox-1697b1369353ecfbd8c8b640e35b908e01126fc4.tar.gz rockbox-1697b1369353ecfbd8c8b640e35b908e01126fc4.zip |
whitespace fixes
Change-Id: I86880595b78e3cae62361c32ca57cf6f6a4ad963
-rw-r--r-- | apps/bookmark.c | 86 | ||||
-rw-r--r-- | apps/cuesheet.c | 10 | ||||
-rw-r--r-- | apps/gui/option_select.c | 16 | ||||
-rw-r--r-- | apps/menu.c | 12 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 6 | ||||
-rw-r--r-- | apps/plugins/keybox.c | 2 | ||||
-rw-r--r-- | apps/plugins/lrcplayer.c | 4 | ||||
-rw-r--r-- | apps/plugins/main_menu_config.c | 2 | ||||
-rw-r--r-- | apps/plugins/random_folder_advance_config.c | 50 | ||||
-rw-r--r-- | apps/tree.c | 26 | ||||
-rw-r--r-- | manual/appendix/config_file_options.tex | 2 |
11 files changed, 108 insertions, 108 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index dece69dce6..70dbd8075d 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -75,10 +75,10 @@ static struct { | |||
75 | bool shuffle; | 75 | bool shuffle; |
76 | /* optional values */ | 76 | /* optional values */ |
77 | int pitch; | 77 | int pitch; |
78 | int speed; | 78 | int speed; |
79 | } bm; | 79 | } bm; |
80 | 80 | ||
81 | static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, | 81 | static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, |
82 | bool most_recent); | 82 | bool most_recent); |
83 | static char* create_bookmark(void); | 83 | static char* create_bookmark(void); |
84 | static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id); | 84 | static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id); |
@@ -275,7 +275,7 @@ static bool get_playlist_and_track(const char *bookmark, char **pl_start, | |||
275 | /* This function adds a bookmark to a file. */ | 275 | /* This function adds a bookmark to a file. */ |
276 | /* Returns true on successful bookmark add. */ | 276 | /* Returns true on successful bookmark add. */ |
277 | /* ------------------------------------------------------------------------*/ | 277 | /* ------------------------------------------------------------------------*/ |
278 | static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, | 278 | static bool add_bookmark(const char* bookmark_file_name, const char* bookmark, |
279 | bool most_recent) | 279 | bool most_recent) |
280 | { | 280 | { |
281 | int temp_bookmark_file = 0; | 281 | int temp_bookmark_file = 0; |
@@ -466,7 +466,7 @@ bool bookmark_autoload(const char* file) | |||
466 | else | 466 | else |
467 | { | 467 | { |
468 | int ret = select_bookmark(global_bookmark_file_name, true, &bookmark); | 468 | int ret = select_bookmark(global_bookmark_file_name, true, &bookmark); |
469 | 469 | ||
470 | if (bookmark != NULL) | 470 | if (bookmark != NULL) |
471 | { | 471 | { |
472 | if (!play_bookmark(bookmark)) | 472 | if (!play_bookmark(bookmark)) |
@@ -475,7 +475,7 @@ bool bookmark_autoload(const char* file) | |||
475 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | 475 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); |
476 | } | 476 | } |
477 | 477 | ||
478 | /* Act as if autoload was done even if it failed, since the | 478 | /* Act as if autoload was done even if it failed, since the |
479 | * user did make an active selection. | 479 | * user did make an active selection. |
480 | */ | 480 | */ |
481 | return true; | 481 | return true; |
@@ -520,7 +520,7 @@ bool bookmark_load(const char* file, bool autoload) | |||
520 | { | 520 | { |
521 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | 521 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); |
522 | } | 522 | } |
523 | 523 | ||
524 | return false; | 524 | return false; |
525 | } | 525 | } |
526 | } | 526 | } |
@@ -541,7 +541,7 @@ static int get_bookmark_count(const char* bookmark_file_name) | |||
541 | { | 541 | { |
542 | read_count++; | 542 | read_count++; |
543 | } | 543 | } |
544 | 544 | ||
545 | close(file); | 545 | close(file); |
546 | return read_count; | 546 | return read_count; |
547 | } | 547 | } |
@@ -563,25 +563,25 @@ static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line) | |||
563 | /* Entire file fits in buffer */ | 563 | /* Entire file fits in buffer */ |
564 | first_line = 0; | 564 | first_line = 0; |
565 | } | 565 | } |
566 | 566 | ||
567 | bookmarks->start = first_line; | 567 | bookmarks->start = first_line; |
568 | bookmarks->count = 0; | 568 | bookmarks->count = 0; |
569 | bookmarks->reload = false; | 569 | bookmarks->reload = false; |
570 | 570 | ||
571 | while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0) | 571 | while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0) |
572 | { | 572 | { |
573 | read_count++; | 573 | read_count++; |
574 | 574 | ||
575 | if (read_count >= first_line) | 575 | if (read_count >= first_line) |
576 | { | 576 | { |
577 | dest -= strlen(global_read_buffer) + 1; | 577 | dest -= strlen(global_read_buffer) + 1; |
578 | 578 | ||
579 | if (dest < ((char*) bookmarks) + sizeof(*bookmarks) | 579 | if (dest < ((char*) bookmarks) + sizeof(*bookmarks) |
580 | + (sizeof(char*) * (bookmarks->count + 1))) | 580 | + (sizeof(char*) * (bookmarks->count + 1))) |
581 | { | 581 | { |
582 | break; | 582 | break; |
583 | } | 583 | } |
584 | 584 | ||
585 | strcpy(dest, global_read_buffer); | 585 | strcpy(dest, global_read_buffer); |
586 | bookmarks->items[bookmarks->count] = dest; | 586 | bookmarks->items[bookmarks->count] = dest; |
587 | bookmarks->count++; | 587 | bookmarks->count++; |
@@ -604,22 +604,22 @@ static const char* get_bookmark_info(int list_index, | |||
604 | { | 604 | { |
605 | if (index == 0) | 605 | if (index == 0) |
606 | { | 606 | { |
607 | return list_index % 2 == 0 | 607 | return list_index % 2 == 0 |
608 | ? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " "; | 608 | ? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " "; |
609 | } | 609 | } |
610 | 610 | ||
611 | index--; | 611 | index--; |
612 | } | 612 | } |
613 | 613 | ||
614 | if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count) | 614 | if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count) |
615 | || (index < bookmarks->start)) | 615 | || (index < bookmarks->start)) |
616 | { | 616 | { |
617 | int read_index = index; | 617 | int read_index = index; |
618 | 618 | ||
619 | /* Using count as a guide on how far to move could possibly fail | 619 | /* Using count as a guide on how far to move could possibly fail |
620 | * sometimes. Use byte count if that is a problem? | 620 | * sometimes. Use byte count if that is a problem? |
621 | */ | 621 | */ |
622 | 622 | ||
623 | if (read_index != 0) | 623 | if (read_index != 0) |
624 | { | 624 | { |
625 | /* Move count * 3 / 4 items in the direction the user is moving, | 625 | /* Move count * 3 / 4 items in the direction the user is moving, |
@@ -627,31 +627,31 @@ static const char* get_bookmark_info(int list_index, | |||
627 | */ | 627 | */ |
628 | int offset = bookmarks->count; | 628 | int offset = bookmarks->count; |
629 | int max = bookmarks->total_count - (bookmarks->count / 2); | 629 | int max = bookmarks->total_count - (bookmarks->count / 2); |
630 | 630 | ||
631 | if (read_index < bookmarks->start) | 631 | if (read_index < bookmarks->start) |
632 | { | 632 | { |
633 | offset *= 3; | 633 | offset *= 3; |
634 | } | 634 | } |
635 | 635 | ||
636 | read_index = index - offset / 4; | 636 | read_index = index - offset / 4; |
637 | 637 | ||
638 | if (read_index > max) | 638 | if (read_index > max) |
639 | { | 639 | { |
640 | read_index = max; | 640 | read_index = max; |
641 | } | 641 | } |
642 | 642 | ||
643 | if (read_index < 0) | 643 | if (read_index < 0) |
644 | { | 644 | { |
645 | read_index = 0; | 645 | read_index = 0; |
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | if (buffer_bookmarks(bookmarks, read_index) <= index) | 649 | if (buffer_bookmarks(bookmarks, read_index) <= index) |
650 | { | 650 | { |
651 | return ""; | 651 | return ""; |
652 | } | 652 | } |
653 | } | 653 | } |
654 | 654 | ||
655 | if (!parse_bookmark(bookmarks->items[index - bookmarks->start], true, true)) | 655 | if (!parse_bookmark(bookmarks->items[index - bookmarks->start], true, true)) |
656 | { | 656 | { |
657 | return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " "; | 657 | return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " "; |
@@ -662,12 +662,12 @@ static const char* get_bookmark_info(int list_index, | |||
662 | char *name; | 662 | char *name; |
663 | char *format; | 663 | char *format; |
664 | int len = strlen(global_temp_buffer); | 664 | int len = strlen(global_temp_buffer); |
665 | 665 | ||
666 | if (bookmarks->show_playlist_name && len > 0) | 666 | if (bookmarks->show_playlist_name && len > 0) |
667 | { | 667 | { |
668 | name = global_temp_buffer; | 668 | name = global_temp_buffer; |
669 | len--; | 669 | len--; |
670 | 670 | ||
671 | if (name[len] != '/') | 671 | if (name[len] != '/') |
672 | { | 672 | { |
673 | strrsplt(name, '.'); | 673 | strrsplt(name, '.'); |
@@ -689,7 +689,7 @@ static const char* get_bookmark_info(int list_index, | |||
689 | name = global_filename; | 689 | name = global_filename; |
690 | format = "%s"; | 690 | format = "%s"; |
691 | } | 691 | } |
692 | 692 | ||
693 | strrsplt(global_filename, '.'); | 693 | strrsplt(global_filename, '.'); |
694 | snprintf(buffer, buffer_len, format, name, global_filename); | 694 | snprintf(buffer, buffer_len, format, name, global_filename); |
695 | return buffer; | 695 | return buffer; |
@@ -751,12 +751,12 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume | |||
751 | gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2, NULL); | 751 | gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2, NULL); |
752 | if(global_settings.talk_menu) | 752 | if(global_settings.talk_menu) |
753 | gui_synclist_set_voice_callback(&list, bookmark_list_voice_cb); | 753 | gui_synclist_set_voice_callback(&list, bookmark_list_voice_cb); |
754 | gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK), | 754 | gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK), |
755 | Icon_Bookmark); | 755 | Icon_Bookmark); |
756 | 756 | ||
757 | while (!exit) | 757 | while (!exit) |
758 | { | 758 | { |
759 | 759 | ||
760 | if (refresh) | 760 | if (refresh) |
761 | { | 761 | { |
762 | int count = get_bookmark_count(bookmark_file_name); | 762 | int count = get_bookmark_count(bookmark_file_name); |
@@ -805,17 +805,17 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume | |||
805 | if (action == ACTION_STD_CONTEXT) | 805 | if (action == ACTION_STD_CONTEXT) |
806 | { | 806 | { |
807 | MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU), | 807 | MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU), |
808 | NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME), | 808 | NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME), |
809 | ID2P(LANG_BOOKMARK_CONTEXT_DELETE)); | 809 | ID2P(LANG_BOOKMARK_CONTEXT_DELETE)); |
810 | static const int menu_actions[] = | 810 | static const int menu_actions[] = |
811 | { | 811 | { |
812 | ACTION_STD_OK, ACTION_BMS_DELETE | 812 | ACTION_STD_OK, ACTION_BMS_DELETE |
813 | }; | 813 | }; |
814 | int selection = do_menu(&menu_items, NULL, NULL, false); | 814 | int selection = do_menu(&menu_items, NULL, NULL, false); |
815 | 815 | ||
816 | refresh = true; | 816 | refresh = true; |
817 | 817 | ||
818 | if (selection >= 0 && selection <= | 818 | if (selection >= 0 && selection <= |
819 | (int) (sizeof(menu_actions) / sizeof(menu_actions[0]))) | 819 | (int) (sizeof(menu_actions) / sizeof(menu_actions[0]))) |
820 | { | 820 | { |
821 | action = menu_actions[selection]; | 821 | action = menu_actions[selection]; |
@@ -842,7 +842,7 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume | |||
842 | 842 | ||
843 | case ACTION_BMS_DELETE: | 843 | case ACTION_BMS_DELETE: |
844 | if (item >= 0) | 844 | if (item >= 0) |
845 | { | 845 | { |
846 | const char *lines[]={ | 846 | const char *lines[]={ |
847 | ID2P(LANG_REALLY_DELETE) | 847 | ID2P(LANG_REALLY_DELETE) |
848 | }; | 848 | }; |
@@ -854,7 +854,7 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume | |||
854 | const struct text_message yes_message={yes_lines, 1}; | 854 | const struct text_message yes_message={yes_lines, 1}; |
855 | 855 | ||
856 | if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES) | 856 | if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES) |
857 | { | 857 | { |
858 | delete_bookmark(bookmark_file_name, item); | 858 | delete_bookmark(bookmark_file_name, item); |
859 | bookmarks->reload = true; | 859 | bookmarks->reload = true; |
860 | } | 860 | } |
@@ -1002,12 +1002,12 @@ static const char* skip_token(const char* s) | |||
1002 | { | 1002 | { |
1003 | s++; | 1003 | s++; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | if (*s) | 1006 | if (*s) |
1007 | { | 1007 | { |
1008 | s++; | 1008 | s++; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | return s; | 1011 | return s; |
1012 | } | 1012 | } |
1013 | 1013 | ||
@@ -1033,11 +1033,11 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con | |||
1033 | { | 1033 | { |
1034 | const char* s = bookmark; | 1034 | const char* s = bookmark; |
1035 | const char* end; | 1035 | const char* end; |
1036 | 1036 | ||
1037 | #define GET_INT_TOKEN(var) s = int_token(s, &var) | 1037 | #define GET_INT_TOKEN(var) s = int_token(s, &var) |
1038 | #define GET_LONG_TOKEN(var) s = long_token(s, &var) | 1038 | #define GET_LONG_TOKEN(var) s = long_token(s, &var) |
1039 | #define GET_BOOL_TOKEN(var) var = (atoi(s)!=0); s = skip_token(s) | 1039 | #define GET_BOOL_TOKEN(var) var = (atoi(s)!=0); s = skip_token(s) |
1040 | 1040 | ||
1041 | /* if new format bookmark, extract the optional content flags, | 1041 | /* if new format bookmark, extract the optional content flags, |
1042 | otherwise treat as an original format bookmark */ | 1042 | otherwise treat as an original format bookmark */ |
1043 | int opt_flags = 0; | 1043 | int opt_flags = 0; |
@@ -1047,7 +1047,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con | |||
1047 | s++; | 1047 | s++; |
1048 | GET_INT_TOKEN(opt_flags); | 1048 | GET_INT_TOKEN(opt_flags); |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | /* extract all original bookmark tokens */ | 1051 | /* extract all original bookmark tokens */ |
1052 | GET_INT_TOKEN(bm.resume_index); | 1052 | GET_INT_TOKEN(bm.resume_index); |
1053 | GET_LONG_TOKEN(bm.resume_offset); | 1053 | GET_LONG_TOKEN(bm.resume_offset); |
@@ -1057,18 +1057,18 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con | |||
1057 | GET_LONG_TOKEN(bm.resume_time); | 1057 | GET_LONG_TOKEN(bm.resume_time); |
1058 | GET_INT_TOKEN(bm.repeat_mode); | 1058 | GET_INT_TOKEN(bm.repeat_mode); |
1059 | GET_BOOL_TOKEN(bm.shuffle); | 1059 | GET_BOOL_TOKEN(bm.shuffle); |
1060 | 1060 | ||
1061 | /* extract all optional bookmark tokens */ | 1061 | /* extract all optional bookmark tokens */ |
1062 | if (opt_flags & BM_PITCH) | 1062 | if (opt_flags & BM_PITCH) |
1063 | GET_INT_TOKEN(bm.pitch); | 1063 | GET_INT_TOKEN(bm.pitch); |
1064 | if (opt_flags & BM_SPEED) | 1064 | if (opt_flags & BM_SPEED) |
1065 | GET_INT_TOKEN(bm.speed); | 1065 | GET_INT_TOKEN(bm.speed); |
1066 | 1066 | ||
1067 | if (*s == 0) | 1067 | if (*s == 0) |
1068 | { | 1068 | { |
1069 | return false; | 1069 | return false; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | end = strchr(s, ';'); | 1072 | end = strchr(s, ';'); |
1073 | 1073 | ||
1074 | /* extract file names */ | 1074 | /* extract file names */ |
@@ -1077,7 +1077,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con | |||
1077 | size_t len = (end == NULL) ? strlen(s) : (size_t) (end - s); | 1077 | size_t len = (end == NULL) ? strlen(s) : (size_t) (end - s); |
1078 | len = MIN(TEMP_BUF_SIZE - 1, len); | 1078 | len = MIN(TEMP_BUF_SIZE - 1, len); |
1079 | strlcpy(global_temp_buffer, s, len + 1); | 1079 | strlcpy(global_temp_buffer, s, len + 1); |
1080 | 1080 | ||
1081 | if (end != NULL) | 1081 | if (end != NULL) |
1082 | { | 1082 | { |
1083 | end++; | 1083 | end++; |
@@ -1093,7 +1093,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con | |||
1093 | strlcpy(global_filename, end, MAX_PATH); | 1093 | strlcpy(global_filename, end, MAX_PATH); |
1094 | } | 1094 | } |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | return true; | 1097 | return true; |
1098 | } | 1098 | } |
1099 | 1099 | ||
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 57c588ee9a..be89ef96cf 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c | |||
@@ -64,7 +64,7 @@ static bool search_for_cuesheet(const char *path, struct cuesheet_file *cue_file | |||
64 | { | 64 | { |
65 | strcpy(cuepath, CUE_DIR); | 65 | strcpy(cuepath, CUE_DIR); |
66 | if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH) | 66 | if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH) |
67 | goto skip; /* overflow */ | 67 | goto skip; /* overflow */ |
68 | char *dot = strrchr(cuepath, '.'); | 68 | char *dot = strrchr(cuepath, '.'); |
69 | strcpy(dot, ".cue"); | 69 | strcpy(dot, ".cue"); |
70 | if (!file_exists(cuepath)) | 70 | if (!file_exists(cuepath)) |
@@ -305,7 +305,7 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue) | |||
305 | break; | 305 | break; |
306 | } | 306 | } |
307 | 307 | ||
308 | if (dest) | 308 | if (dest) |
309 | { | 309 | { |
310 | if (char_enc == CHAR_ENC_ISO_8859_1) | 310 | if (char_enc == CHAR_ENC_ISO_8859_1) |
311 | { | 311 | { |
@@ -317,7 +317,7 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue) | |||
317 | { | 317 | { |
318 | strlcpy(dest, string, count); | 318 | strlcpy(dest, string, count); |
319 | } | 319 | } |
320 | } | 320 | } |
321 | } | 321 | } |
322 | if (is_embedded) | 322 | if (is_embedded) |
323 | { | 323 | { |
@@ -505,7 +505,7 @@ bool display_cuesheet_content(char* filename) | |||
505 | bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos) | 505 | bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos) |
506 | { | 506 | { |
507 | int track = cue_find_current_track(cue, curr_pos); | 507 | int track = cue_find_current_track(cue, curr_pos); |
508 | 508 | ||
509 | if (direction >= 0 && track == cue->track_count - 1) | 509 | if (direction >= 0 && track == cue->track_count - 1) |
510 | { | 510 | { |
511 | /* we want to get out of the cuesheet */ | 511 | /* we want to get out of the cuesheet */ |
@@ -520,7 +520,7 @@ bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_ | |||
520 | to previous cuesheet segment. If skipping backward after | 520 | to previous cuesheet segment. If skipping backward after |
521 | DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the | 521 | DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the |
522 | current cuesheet segment */ | 522 | current cuesheet segment */ |
523 | if (direction == 1 || | 523 | if (direction == 1 || |
524 | ((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH)) | 524 | ((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH)) |
525 | { | 525 | { |
526 | track += direction; | 526 | track += direction; |
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index ff257a4925..9f1f0a64e3 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -60,7 +60,7 @@ static const char *option_get_timestring(char *buf, int buf_len, | |||
60 | /* these two vars are needed so arbitrary values can be added to the | 60 | /* these two vars are needed so arbitrary values can be added to the |
61 | TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */ | 61 | TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */ |
62 | static int table_setting_oldval = 0, table_setting_array_position = 0; | 62 | static int table_setting_oldval = 0, table_setting_array_position = 0; |
63 | const char *option_get_valuestring(const struct settings_list *setting, | 63 | const char *option_get_valuestring(const struct settings_list *setting, |
64 | char *buffer, int buf_len, | 64 | char *buffer, int buf_len, |
65 | intptr_t temp_var) | 65 | intptr_t temp_var) |
66 | { | 66 | { |
@@ -202,7 +202,7 @@ void option_talk_value(const struct settings_list *setting, int value, bool enqu | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | static int option_talk(int selected_item, void * data) | 206 | static int option_talk(int selected_item, void * data) |
207 | { | 207 | { |
208 | struct settings_list *setting = (struct settings_list *)data; | 208 | struct settings_list *setting = (struct settings_list *)data; |
@@ -320,7 +320,7 @@ static int selection_to_val(const struct settings_list *setting, int selection) | |||
320 | else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING) | 320 | else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING) |
321 | { | 321 | { |
322 | const struct table_setting *info = setting->table_setting; | 322 | const struct table_setting *info = setting->table_setting; |
323 | if (setting->flags&F_ALLOW_ARBITRARY_VALS && | 323 | if (setting->flags&F_ALLOW_ARBITRARY_VALS && |
324 | table_setting_array_position != -1 && | 324 | table_setting_array_position != -1 && |
325 | (selection >= table_setting_array_position)) | 325 | (selection >= table_setting_array_position)) |
326 | { | 326 | { |
@@ -361,7 +361,7 @@ static int selection_to_val(const struct settings_list *setting, int selection) | |||
361 | return max- (selection * step); | 361 | return max- (selection * step); |
362 | } | 362 | } |
363 | 363 | ||
364 | static const char * value_setting_get_name_cb(int selected_item, | 364 | static const char * value_setting_get_name_cb(int selected_item, |
365 | void * data, | 365 | void * data, |
366 | char *buffer, | 366 | char *buffer, |
367 | size_t buffer_len) | 367 | size_t buffer_len) |
@@ -492,16 +492,16 @@ bool option_screen(const struct settings_list *setting, | |||
492 | title = (char*)setting->cfg_vals; | 492 | title = (char*)setting->cfg_vals; |
493 | else | 493 | else |
494 | title = P2STR(option_title); | 494 | title = P2STR(option_title); |
495 | 495 | ||
496 | gui_synclist_set_title(&lists, title, Icon_Questionmark); | 496 | gui_synclist_set_title(&lists, title, Icon_Questionmark); |
497 | gui_synclist_set_icon_callback(&lists, NULL); | 497 | gui_synclist_set_icon_callback(&lists, NULL); |
498 | if(global_settings.talk_menu) | 498 | if(global_settings.talk_menu) |
499 | gui_synclist_set_voice_callback(&lists, option_talk); | 499 | gui_synclist_set_voice_callback(&lists, option_talk); |
500 | 500 | ||
501 | val_to_selection(setting, oldvalue, &nb_items, &selected, &function); | 501 | val_to_selection(setting, oldvalue, &nb_items, &selected, &function); |
502 | gui_synclist_set_nb_items(&lists, nb_items); | 502 | gui_synclist_set_nb_items(&lists, nb_items); |
503 | gui_synclist_select_item(&lists, selected); | 503 | gui_synclist_select_item(&lists, selected); |
504 | 504 | ||
505 | gui_synclist_limit_scroll(&lists, true); | 505 | gui_synclist_limit_scroll(&lists, true); |
506 | gui_synclist_draw(&lists); | 506 | gui_synclist_draw(&lists); |
507 | /* talk the item */ | 507 | /* talk the item */ |
@@ -551,7 +551,7 @@ bool option_screen(const struct settings_list *setting, | |||
551 | { | 551 | { |
552 | if (var_type == F_T_INT || var_type == F_T_UINT) | 552 | if (var_type == F_T_INT || var_type == F_T_UINT) |
553 | *(int*)setting->setting = *variable; | 553 | *(int*)setting->setting = *variable; |
554 | else | 554 | else |
555 | *(bool*)setting->setting = (*variable==1); | 555 | *(bool*)setting->setting = (*variable==1); |
556 | } | 556 | } |
557 | settings_save(); | 557 | settings_save(); |
diff --git a/apps/menu.c b/apps/menu.c index c4f3024930..4991b05383 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -68,7 +68,7 @@ static int current_subitems_count = 0; | |||
68 | static int talk_menu_item(int selected_item, void *data); | 68 | static int talk_menu_item(int selected_item, void *data); |
69 | 69 | ||
70 | static void get_menu_callback(const struct menu_item_ex *m, | 70 | static void get_menu_callback(const struct menu_item_ex *m, |
71 | menu_callback_type *menu_callback) | 71 | menu_callback_type *menu_callback) |
72 | { | 72 | { |
73 | if (m->flags&(MENU_HAS_DESC|MENU_DYNAMIC_DESC)) | 73 | if (m->flags&(MENU_HAS_DESC|MENU_DYNAMIC_DESC)) |
74 | *menu_callback= m->callback_and_desc->menu_callback; | 74 | *menu_callback= m->callback_and_desc->menu_callback; |
@@ -340,7 +340,7 @@ void do_setting_screen(const struct settings_list *setting, const char * title, | |||
340 | option_screen((struct settings_list *)setting, parent, | 340 | option_screen((struct settings_list *)setting, parent, |
341 | setting->flags&F_TEMPVAR, (char*)title); | 341 | setting->flags&F_TEMPVAR, (char*)title); |
342 | } | 342 | } |
343 | 343 | ||
344 | 344 | ||
345 | void do_setting_from_menu(const struct menu_item_ex *temp, | 345 | void do_setting_from_menu(const struct menu_item_ex *temp, |
346 | struct viewport parent[NB_SCREENS]) | 346 | struct viewport parent[NB_SCREENS]) |
@@ -501,12 +501,12 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
501 | ID2P(LANG_RIGHT_QS_ITEM), | 501 | ID2P(LANG_RIGHT_QS_ITEM), |
502 | ID2P(LANG_ADD_TO_FAVES)); | 502 | ID2P(LANG_ADD_TO_FAVES)); |
503 | #endif | 503 | #endif |
504 | MENUITEM_STRINGLIST(notquickscreen_able_option, | 504 | MENUITEM_STRINGLIST(notquickscreen_able_option, |
505 | ID2P(LANG_ONPLAY_MENU_TITLE), NULL, | 505 | ID2P(LANG_ONPLAY_MENU_TITLE), NULL, |
506 | ID2P(LANG_RESET_SETTING)); | 506 | ID2P(LANG_RESET_SETTING)); |
507 | const struct menu_item_ex *menu; | 507 | const struct menu_item_ex *menu; |
508 | int menu_selection = 0; | 508 | int menu_selection = 0; |
509 | const struct settings_list *setting = | 509 | const struct settings_list *setting = |
510 | find_setting(temp->variable, NULL); | 510 | find_setting(temp->variable, NULL); |
511 | #ifdef HAVE_QUICKSCREEN | 511 | #ifdef HAVE_QUICKSCREEN |
512 | if (is_setting_quickscreenable(setting)) | 512 | if (is_setting_quickscreenable(setting)) |
@@ -574,7 +574,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
574 | if (!exiting_menu && (menu->flags&MENU_EXITAFTERTHISMENU)) | 574 | if (!exiting_menu && (menu->flags&MENU_EXITAFTERTHISMENU)) |
575 | done = true; | 575 | done = true; |
576 | else | 576 | else |
577 | init_menu_lists(menu, &lists, | 577 | init_menu_lists(menu, &lists, |
578 | menu_stack_selected_item[stack_top], false, vps); | 578 | menu_stack_selected_item[stack_top], false, vps); |
579 | redraw_lists = true; | 579 | redraw_lists = true; |
580 | /* new menu, so reload the callback */ | 580 | /* new menu, so reload the callback */ |
@@ -688,7 +688,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
688 | init_menu_lists(menu,&lists,selected,true,vps); | 688 | init_menu_lists(menu,&lists,selected,true,vps); |
689 | /* callback was changed, so reload the menu's callback */ | 689 | /* callback was changed, so reload the menu's callback */ |
690 | get_menu_callback(menu, &menu_callback); | 690 | get_menu_callback(menu, &menu_callback); |
691 | if ((menu->flags&MENU_EXITAFTERTHISMENU) && | 691 | if ((menu->flags&MENU_EXITAFTERTHISMENU) && |
692 | !(temp->flags&MENU_EXITAFTERTHISMENU)) | 692 | !(temp->flags&MENU_EXITAFTERTHISMENU)) |
693 | { | 693 | { |
694 | done = true; | 694 | done = true; |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index e0e2e787cd..21b61d4a67 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -98,7 +98,7 @@ struct playlist_viewer { | |||
98 | int selected_track; /* The selected track, relative (first is 0) */ | 98 | int selected_track; /* The selected track, relative (first is 0) */ |
99 | int moving_track; /* The track to move, relative (first is 0) | 99 | int moving_track; /* The track to move, relative (first is 0) |
100 | or -1 if nothing is currently being moved */ | 100 | or -1 if nothing is currently being moved */ |
101 | int moving_playlist_index; /* Playlist-relative index (as opposed to | 101 | int moving_playlist_index; /* Playlist-relative index (as opposed to |
102 | viewer-relative index) of moving track */ | 102 | viewer-relative index) of moving track */ |
103 | struct playlist_buffer buffer; | 103 | struct playlist_buffer buffer; |
104 | }; | 104 | }; |
@@ -295,7 +295,7 @@ static struct playlist_entry * playlist_buffer_get_track(struct playlist_buffer | |||
295 | the name_buffer is probably too small to store enough | 295 | the name_buffer is probably too small to store enough |
296 | titles to fill the screen, and preload data in the short | 296 | titles to fill the screen, and preload data in the short |
297 | direction. | 297 | direction. |
298 | 298 | ||
299 | If this happens then scrolling performance will probably | 299 | If this happens then scrolling performance will probably |
300 | be quite low, but it's better then having Data Abort errors */ | 300 | be quite low, but it's better then having Data Abort errors */ |
301 | playlist_buffer_load_entries(pb, index, FORWARD); | 301 | playlist_buffer_load_entries(pb, index, FORWARD); |
@@ -319,7 +319,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, | |||
319 | } | 319 | } |
320 | if (!have_list && (playlist_amount() > 0)) | 320 | if (!have_list && (playlist_amount() > 0)) |
321 | { | 321 | { |
322 | /*If dynamic playlist still exists, view it anyway even | 322 | /*If dynamic playlist still exists, view it anyway even |
323 | if playback has reached the end of the playlist */ | 323 | if playback has reached the end of the playlist */ |
324 | have_list = true; | 324 | have_list = true; |
325 | } | 325 | } |
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 1689321abe..a074ffc598 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -75,7 +75,7 @@ static void encrypt_buffer(char *buf, size_t size, uint32_t *key); | |||
75 | static void decrypt_buffer(char *buf, size_t size, uint32_t *key); | 75 | static void decrypt_buffer(char *buf, size_t size, uint32_t *key); |
76 | 76 | ||
77 | /* the following two functions are the reference TEA implementation by | 77 | /* the following two functions are the reference TEA implementation by |
78 | David Wheeler and Roger Needham taken from | 78 | David Wheeler and Roger Needham taken from |
79 | http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm */ | 79 | http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm */ |
80 | 80 | ||
81 | static void do_encrypt(uint32_t* v, uint32_t* k) | 81 | static void do_encrypt(uint32_t* v, uint32_t* k) |
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 225f0c8689..f42b96b5b3 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c | |||
@@ -428,8 +428,8 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
428 | int nword; | 428 | int nword; |
429 | int word_count, word_width; | 429 | int word_count, word_width; |
430 | const unsigned char *str; | 430 | const unsigned char *str; |
431 | } | 431 | } |
432 | sp, | 432 | sp, |
433 | cr; | 433 | cr; |
434 | 434 | ||
435 | lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */ | 435 | lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */ |
diff --git a/apps/plugins/main_menu_config.c b/apps/plugins/main_menu_config.c index f66165e63d..9f651094b1 100644 --- a/apps/plugins/main_menu_config.c +++ b/apps/plugins/main_menu_config.c | |||
@@ -171,7 +171,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
171 | struct gui_synclist list; | 171 | struct gui_synclist list; |
172 | bool done = false; | 172 | bool done = false; |
173 | int action, cur_sel; | 173 | int action, cur_sel; |
174 | 174 | ||
175 | menu_table = rb->root_menu_get_options(&menu_item_count); | 175 | menu_table = rb->root_menu_get_options(&menu_item_count); |
176 | load_from_cfg(); | 176 | load_from_cfg(); |
177 | 177 | ||
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index ca0d5f397d..2c9fb411ac 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -211,7 +211,7 @@ static bool custom_dir(void) | |||
211 | rb->close(fd2); | 211 | rb->close(fd2); |
212 | if(errors) | 212 | if(errors) |
213 | /* Press button to continue */ | 213 | /* Press button to continue */ |
214 | rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK); | 214 | rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK); |
215 | } | 215 | } |
216 | else | 216 | else |
217 | return false; | 217 | return false; |
@@ -259,11 +259,11 @@ static int load_list(void) | |||
259 | { | 259 | { |
260 | return -2; | 260 | return -2; |
261 | } | 261 | } |
262 | 262 | ||
263 | rb->read(myfd,buffer,buffer_size); | 263 | rb->read(myfd,buffer,buffer_size); |
264 | rb->close(myfd); | 264 | rb->close(myfd); |
265 | list = (struct file_format *)buffer; | 265 | list = (struct file_format *)buffer; |
266 | 266 | ||
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | 269 | ||
@@ -288,7 +288,7 @@ static int save_list(void) | |||
288 | rb->lseek(myfd,0,SEEK_SET); | 288 | rb->lseek(myfd,0,SEEK_SET); |
289 | rb->write(myfd,&dirs_count,sizeof(int)); | 289 | rb->write(myfd,&dirs_count,sizeof(int)); |
290 | rb->close(myfd); | 290 | rb->close(myfd); |
291 | 291 | ||
292 | return 1; | 292 | return 1; |
293 | } | 293 | } |
294 | 294 | ||
@@ -298,22 +298,22 @@ static int edit_list(void) | |||
298 | bool exit = false; | 298 | bool exit = false; |
299 | int button,i; | 299 | int button,i; |
300 | int selection, ret = 0; | 300 | int selection, ret = 0; |
301 | 301 | ||
302 | /* load the dat file if not already done */ | 302 | /* load the dat file if not already done */ |
303 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) | 303 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) |
304 | { | 304 | { |
305 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); | 305 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); |
306 | return -1; | 306 | return -1; |
307 | } | 307 | } |
308 | 308 | ||
309 | dirs_count = list->count; | 309 | dirs_count = list->count; |
310 | 310 | ||
311 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); | 311 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); |
312 | rb->gui_synclist_set_icon_callback(&lists,NULL); | 312 | rb->gui_synclist_set_icon_callback(&lists,NULL); |
313 | rb->gui_synclist_set_nb_items(&lists,list->count); | 313 | rb->gui_synclist_set_nb_items(&lists,list->count); |
314 | rb->gui_synclist_limit_scroll(&lists,true); | 314 | rb->gui_synclist_limit_scroll(&lists,true); |
315 | rb->gui_synclist_select_item(&lists, 0); | 315 | rb->gui_synclist_select_item(&lists, 0); |
316 | 316 | ||
317 | while (!exit) | 317 | while (!exit) |
318 | { | 318 | { |
319 | rb->gui_synclist_draw(&lists); | 319 | rb->gui_synclist_draw(&lists); |
@@ -387,22 +387,22 @@ static int export_list_to_file_text(void) | |||
387 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); | 387 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); |
388 | return 0; | 388 | return 0; |
389 | } | 389 | } |
390 | 390 | ||
391 | if (list->count <= 0) | 391 | if (list->count <= 0) |
392 | { | 392 | { |
393 | rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE); | 393 | rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE); |
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | 396 | ||
397 | /* create and open the file */ | 397 | /* create and open the file */ |
398 | int myfd = rb->creat(RFA_FILE_TEXT, 0666); | 398 | int myfd = rb->creat(RFA_FILE_TEXT, 0666); |
399 | if (myfd < 0) | 399 | if (myfd < 0) |
400 | { | 400 | { |
401 | rb->splashf(HZ*4, "failed to open: fd = %d, file = %s", | 401 | rb->splashf(HZ*4, "failed to open: fd = %d, file = %s", |
402 | myfd, RFA_FILE_TEXT); | 402 | myfd, RFA_FILE_TEXT); |
403 | return -1; | 403 | return -1; |
404 | } | 404 | } |
405 | 405 | ||
406 | /* write each directory to file */ | 406 | /* write each directory to file */ |
407 | for (i = 0; i < list->count; i++) | 407 | for (i = 0; i < list->count; i++) |
408 | { | 408 | { |
@@ -411,7 +411,7 @@ static int export_list_to_file_text(void) | |||
411 | rb->fdprintf(myfd, "%s\n", list->folder[i]); | 411 | rb->fdprintf(myfd, "%s\n", list->folder[i]); |
412 | } | 412 | } |
413 | } | 413 | } |
414 | 414 | ||
415 | rb->close(myfd); | 415 | rb->close(myfd); |
416 | rb->splash(HZ, "Done"); | 416 | rb->splash(HZ, "Done"); |
417 | return 1; | 417 | return 1; |
@@ -420,7 +420,7 @@ static int export_list_to_file_text(void) | |||
420 | static int import_list_from_file_text(void) | 420 | static int import_list_from_file_text(void) |
421 | { | 421 | { |
422 | char line[MAX_PATH]; | 422 | char line[MAX_PATH]; |
423 | 423 | ||
424 | buffer = rb->plugin_get_audio_buffer(&buffer_size); | 424 | buffer = rb->plugin_get_audio_buffer(&buffer_size); |
425 | if (buffer == NULL) | 425 | if (buffer == NULL) |
426 | { | 426 | { |
@@ -434,11 +434,11 @@ static int import_list_from_file_text(void) | |||
434 | rb->splashf(HZ*2, "failed to open: %s", RFA_FILE_TEXT); | 434 | rb->splashf(HZ*2, "failed to open: %s", RFA_FILE_TEXT); |
435 | return -1; | 435 | return -1; |
436 | } | 436 | } |
437 | 437 | ||
438 | /* set the list structure, and initialize count */ | 438 | /* set the list structure, and initialize count */ |
439 | list = (struct file_format *)buffer; | 439 | list = (struct file_format *)buffer; |
440 | list->count = 0; | 440 | list->count = 0; |
441 | 441 | ||
442 | while ((rb->read_line(myfd, line, MAX_PATH - 1)) > 0) | 442 | while ((rb->read_line(myfd, line, MAX_PATH - 1)) > 0) |
443 | { | 443 | { |
444 | /* copy the dir name, and skip the newline */ | 444 | /* copy the dir name, and skip the newline */ |
@@ -448,16 +448,16 @@ static int import_list_from_file_text(void) | |||
448 | { | 448 | { |
449 | if (line[len-1] == 0x0A || line[len-1] == 0x0D) | 449 | if (line[len-1] == 0x0A || line[len-1] == 0x0D) |
450 | line[len-1] = 0x00; | 450 | line[len-1] = 0x00; |
451 | if (len > 1 && | 451 | if (len > 1 && |
452 | (line[len-2] == 0x0A || line[len-2] == 0x0D)) | 452 | (line[len-2] == 0x0A || line[len-2] == 0x0D)) |
453 | line[len-2] = 0x00; | 453 | line[len-2] = 0x00; |
454 | } | 454 | } |
455 | 455 | ||
456 | rb->strcpy(list->folder[list->count++], line); | 456 | rb->strcpy(list->folder[list->count++], line); |
457 | } | 457 | } |
458 | 458 | ||
459 | rb->close(myfd); | 459 | rb->close(myfd); |
460 | 460 | ||
461 | if (list->count == 0) | 461 | if (list->count == 0) |
462 | { | 462 | { |
463 | load_list(); | 463 | load_list(); |
@@ -484,14 +484,14 @@ static int start_shuffled_play(void) | |||
484 | rb->splashf(HZ*2, "Not enough memory for shuffling"); | 484 | rb->splashf(HZ*2, "Not enough memory for shuffling"); |
485 | return 0; | 485 | return 0; |
486 | } | 486 | } |
487 | 487 | ||
488 | /* load the dat file if not already done */ | 488 | /* load the dat file if not already done */ |
489 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) | 489 | if ((list == NULL || list->count == 0) && (i = load_list()) != 0) |
490 | { | 490 | { |
491 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); | 491 | rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); |
492 | return 0; | 492 | return 0; |
493 | } | 493 | } |
494 | 494 | ||
495 | if (list->count <= 0) | 495 | if (list->count <= 0) |
496 | { | 496 | { |
497 | rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE); | 497 | rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE); |
@@ -507,7 +507,7 @@ static int start_shuffled_play(void) | |||
507 | } | 507 | } |
508 | for(i=0;i<list->count;i++) | 508 | for(i=0;i<list->count;i++) |
509 | order[i]=i; | 509 | order[i]=i; |
510 | 510 | ||
511 | for(i = list->count - 1; i >= 0; i--) | 511 | for(i = list->count - 1; i >= 0; i--) |
512 | { | 512 | { |
513 | /* the rand is from 0 to RAND_MAX, so adjust to our value range */ | 513 | /* the rand is from 0 to RAND_MAX, so adjust to our value range */ |
@@ -518,7 +518,7 @@ static int start_shuffled_play(void) | |||
518 | order[candidate] = order[i]; | 518 | order[candidate] = order[i]; |
519 | order[i] = store; | 519 | order[i] = store; |
520 | } | 520 | } |
521 | 521 | ||
522 | /* We don't want whatever is playing */ | 522 | /* We don't want whatever is playing */ |
523 | if (!(rb->playlist_remove_all_tracks(NULL) == 0 | 523 | if (!(rb->playlist_remove_all_tracks(NULL) == 0 |
524 | && rb->playlist_create(NULL, NULL) == 0)) | 524 | && rb->playlist_create(NULL, NULL) == 0)) |
@@ -643,6 +643,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
643 | #endif | 643 | #endif |
644 | 644 | ||
645 | cancel = false; | 645 | cancel = false; |
646 | 646 | ||
647 | return main_menu(); | 647 | return main_menu(); |
648 | } | 648 | } |
diff --git a/apps/tree.c b/apps/tree.c index 1f7102dbb9..f50d424a82 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -128,7 +128,7 @@ static const char* tree_get_filename(int selected_item, void *data, | |||
128 | { | 128 | { |
129 | return tagtree_get_entry_name(&tc, selected_item, buffer, buffer_len); | 129 | return tagtree_get_entry_name(&tc, selected_item, buffer, buffer_len); |
130 | } | 130 | } |
131 | else | 131 | else |
132 | #endif | 132 | #endif |
133 | { | 133 | { |
134 | struct entry *entry = tree_get_entry_at(local_tc, selected_item); | 134 | struct entry *entry = tree_get_entry_at(local_tc, selected_item); |
@@ -137,7 +137,7 @@ static const char* tree_get_filename(int selected_item, void *data, | |||
137 | name = entry->name; | 137 | name = entry->name; |
138 | attr = entry->attr; | 138 | attr = entry->attr; |
139 | } | 139 | } |
140 | 140 | ||
141 | if(!(attr & ATTR_DIRECTORY)) | 141 | if(!(attr & ATTR_DIRECTORY)) |
142 | { | 142 | { |
143 | switch(global_settings.show_filename_ext) | 143 | switch(global_settings.show_filename_ext) |
@@ -363,7 +363,7 @@ static int update_dir(void) | |||
363 | changed = true; | 363 | changed = true; |
364 | } | 364 | } |
365 | } | 365 | } |
366 | else | 366 | else |
367 | #endif | 367 | #endif |
368 | { | 368 | { |
369 | tc.sort_dir = global_settings.sort_dir; | 369 | tc.sort_dir = global_settings.sort_dir; |
@@ -391,7 +391,7 @@ static int update_dir(void) | |||
391 | { | 391 | { |
392 | if( | 392 | if( |
393 | #ifdef HAVE_TAGCACHE | 393 | #ifdef HAVE_TAGCACHE |
394 | !id3db && | 394 | !id3db && |
395 | #endif | 395 | #endif |
396 | tc.dirfull ) | 396 | tc.dirfull ) |
397 | { | 397 | { |
@@ -474,7 +474,7 @@ void resume_directory(const char *dir) | |||
474 | #ifdef HAVE_TAGCACHE | 474 | #ifdef HAVE_TAGCACHE |
475 | if (!id3db) | 475 | if (!id3db) |
476 | #endif | 476 | #endif |
477 | *tc.dirfilter = global_settings.dirfilter; | 477 | *tc.dirfilter = global_settings.dirfilter; |
478 | ret = ft_load(&tc, dir); | 478 | ret = ft_load(&tc, dir); |
479 | *tc.dirfilter = dirfilter; | 479 | *tc.dirfilter = dirfilter; |
480 | if (ret < 0) | 480 | if (ret < 0) |
@@ -534,7 +534,7 @@ char* get_current_file(char* buffer, size_t buffer_len) | |||
534 | return NULL; | 534 | return NULL; |
535 | } | 535 | } |
536 | 536 | ||
537 | /* Allow apps to change our dirfilter directly (required for sub browsers) | 537 | /* Allow apps to change our dirfilter directly (required for sub browsers) |
538 | if they're suddenly going to become a file browser for example */ | 538 | if they're suddenly going to become a file browser for example */ |
539 | void set_dirfilter(int l_dirfilter) | 539 | void set_dirfilter(int l_dirfilter) |
540 | { | 540 | { |
@@ -712,7 +712,7 @@ static int dirbrowse(void) | |||
712 | #endif | 712 | #endif |
713 | if (ft_exit(&tc) == 3) | 713 | if (ft_exit(&tc) == 3) |
714 | exit_func = true; | 714 | exit_func = true; |
715 | 715 | ||
716 | restore = true; | 716 | restore = true; |
717 | break; | 717 | break; |
718 | 718 | ||
@@ -976,7 +976,7 @@ int rockbox_browse(struct browse_context *browse) | |||
976 | browse->root, browse->selected); | 976 | browse->root, browse->selected); |
977 | set_current_file(current); | 977 | set_current_file(current); |
978 | /* set_current_file changes dirlevel, change it back */ | 978 | /* set_current_file changes dirlevel, change it back */ |
979 | tc.dirlevel = 0; | 979 | tc.dirlevel = 0; |
980 | } | 980 | } |
981 | 981 | ||
982 | ret_val = dirbrowse(); | 982 | ret_val = dirbrowse(); |
@@ -1100,7 +1100,7 @@ bool bookmark_play(char *resume_file, int index, unsigned long elapsed, | |||
1100 | else search for it */ | 1100 | else search for it */ |
1101 | peek_filename = playlist_peek(index, filename_buf, | 1101 | peek_filename = playlist_peek(index, filename_buf, |
1102 | sizeof(filename_buf)); | 1102 | sizeof(filename_buf)); |
1103 | 1103 | ||
1104 | if (peek_filename == NULL) | 1104 | if (peek_filename == NULL) |
1105 | { | 1105 | { |
1106 | /* playlist has shrunk, search from the top */ | 1106 | /* playlist has shrunk, search from the top */ |
@@ -1110,7 +1110,7 @@ bool bookmark_play(char *resume_file, int index, unsigned long elapsed, | |||
1110 | if (peek_filename == NULL) | 1110 | if (peek_filename == NULL) |
1111 | return false; | 1111 | return false; |
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | if (strcmp(strrchr(peek_filename, '/') + 1, filename)) | 1114 | if (strcmp(strrchr(peek_filename, '/') + 1, filename)) |
1115 | { | 1115 | { |
1116 | for ( i=0; i < playlist_amount(); i++ ) | 1116 | for ( i=0; i < playlist_amount(); i++ ) |
@@ -1209,7 +1209,7 @@ void tree_flush(void) | |||
1209 | global_status.dircache_size = info.last_size; | 1209 | global_status.dircache_size = info.last_size; |
1210 | #ifdef HAVE_EEPROM_SETTINGS | 1210 | #ifdef HAVE_EEPROM_SETTINGS |
1211 | savecache = firmware_settings.initialized; | 1211 | savecache = firmware_settings.initialized; |
1212 | #endif | 1212 | #endif |
1213 | } | 1213 | } |
1214 | else | 1214 | else |
1215 | { | 1215 | { |
@@ -1231,11 +1231,11 @@ void tree_restore(void) | |||
1231 | #ifdef HAVE_EEPROM_SETTINGS | 1231 | #ifdef HAVE_EEPROM_SETTINGS |
1232 | firmware_settings.disk_clean = false; | 1232 | firmware_settings.disk_clean = false; |
1233 | #endif | 1233 | #endif |
1234 | 1234 | ||
1235 | #ifdef HAVE_TC_RAMCACHE | 1235 | #ifdef HAVE_TC_RAMCACHE |
1236 | remove(TAGCACHE_STATEFILE); | 1236 | remove(TAGCACHE_STATEFILE); |
1237 | #endif | 1237 | #endif |
1238 | 1238 | ||
1239 | #ifdef HAVE_DIRCACHE | 1239 | #ifdef HAVE_DIRCACHE |
1240 | if (global_settings.dircache && dircache_resume() > 0) | 1240 | if (global_settings.dircache && dircache_resume() > 0) |
1241 | { | 1241 | { |
diff --git a/manual/appendix/config_file_options.tex b/manual/appendix/config_file_options.tex index abf6cf7f96..ac3910ce18 100644 --- a/manual/appendix/config_file_options.tex +++ b/manual/appendix/config_file_options.tex | |||
@@ -316,7 +316,7 @@ | |||
316 | remote scroll step | 316 | remote scroll step |
317 | & 1 to 160 & N/A\\ | 317 | & 1 to 160 & N/A\\ |
318 | remote scroll delay | 318 | remote scroll delay |
319 | & 0 to 2500 & ms\\ | 319 | & 0 to 2500 & ms\\ |
320 | remote bidir limit | 320 | remote bidir limit |
321 | & 0 to 200 & N/A\\ | 321 | & 0 to 200 & N/A\\ |
322 | backlight filters first remote keypress | 322 | backlight filters first remote keypress |