FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
273fbadb55
commit
8e6030c822
22 changed files with 11 additions and 155 deletions
|
@ -778,13 +778,6 @@ bool list_do_action(int context, int timeout,
|
|||
return gui_synclist_do_button(lists, action, wrap);
|
||||
}
|
||||
|
||||
bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
|
||||
enum screen_type screen, int item)
|
||||
{
|
||||
int nb_lines = list_get_nb_lines(lists, screen);
|
||||
return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines;
|
||||
}
|
||||
|
||||
/* Simple use list implementation */
|
||||
static int simplelist_line_count = 0;
|
||||
static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];
|
||||
|
|
|
@ -165,8 +165,6 @@ extern void gui_synclist_set_title(struct gui_synclist * lists, char * title,
|
|||
enum themable_icons icon);
|
||||
extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
|
||||
bool hide);
|
||||
extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
|
||||
enum screen_type screen, int item);
|
||||
/*
|
||||
* Do the action implied by the given button,
|
||||
* returns true if the action was handled.
|
||||
|
|
|
@ -95,39 +95,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
void skin_statusbar_changed(struct gui_wps *skin)
|
||||
{
|
||||
if (!skin)
|
||||
return;
|
||||
struct wps_data *data = skin->data;
|
||||
const struct screen *display = skin->display;
|
||||
const int screen = display->screen_type;
|
||||
struct skin_viewport *svp = skin_find_item(VP_DEFAULT_LABEL_STRING, SKIN_FIND_VP, data);
|
||||
|
||||
struct viewport *vp = &svp->vp;
|
||||
viewport_set_defaults(vp, screen);
|
||||
|
||||
if (data->wps_sb_tag)
|
||||
{ /* fix up the default viewport */
|
||||
if (data->show_sb_on_wps)
|
||||
{
|
||||
if (statusbar_position(screen) != STATUSBAR_OFF)
|
||||
return; /* vp is fixed already */
|
||||
|
||||
vp->y = STATUSBAR_HEIGHT;
|
||||
vp->height = display->lcdheight - STATUSBAR_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (statusbar_position(screen) == STATUSBAR_OFF)
|
||||
return; /* vp is fixed already */
|
||||
vp->y = vp->x = 0;
|
||||
vp->height = display->lcdheight;
|
||||
vp->width = display->lcdwidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
|
||||
{
|
||||
struct screen *display = gwps->display;
|
||||
|
|
|
@ -57,9 +57,6 @@ void skin_update(enum skinnable_screens skin, enum screen_type screen,
|
|||
bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
|
||||
const char *buf, bool isfile);
|
||||
|
||||
/* call this in statusbar toggle handlers if needed */
|
||||
void skin_statusbar_changed(struct gui_wps*);
|
||||
|
||||
bool skin_has_sbs(enum screen_type screen, struct wps_data *data);
|
||||
|
||||
|
||||
|
|
|
@ -250,6 +250,7 @@ const int rec_format_afmt[REC_NUM_FORMATS] =
|
|||
[REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV,
|
||||
};
|
||||
|
||||
#if 0 /* Currently unused, left for reference and future use */
|
||||
/* get AFMT_* corresponding REC_FORMAT_* */
|
||||
const int afmt_rec_format[AFMT_NUM_CODECS] =
|
||||
{
|
||||
|
@ -261,6 +262,7 @@ const int afmt_rec_format[AFMT_NUM_CODECS] =
|
|||
[AFMT_WAVPACK] = REC_FORMAT_WAVPACK,
|
||||
[AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV,
|
||||
};
|
||||
#endif
|
||||
#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
|
|
|
@ -149,7 +149,7 @@ enum rec_format_indexes
|
|||
/* get REC_FORMAT_* corresponding AFMT_* */
|
||||
extern const int rec_format_afmt[REC_NUM_FORMATS];
|
||||
/* get AFMT_* corresponding REC_FORMAT_* */
|
||||
extern const int afmt_rec_format[AFMT_NUM_CODECS];
|
||||
/* unused: extern const int afmt_rec_format[AFMT_NUM_CODECS]; */
|
||||
|
||||
#define AFMT_ENTRY(label, root_fname, enc_root_fname, func, ext_list) \
|
||||
{ label, root_fname, enc_root_fname, func, ext_list }
|
||||
|
|
|
@ -3625,12 +3625,6 @@ bool audio_restore_playback(int type)
|
|||
}
|
||||
}
|
||||
|
||||
/* Has the playback buffer been completely claimed? */
|
||||
bool audio_buffer_state_trashed(void)
|
||||
{
|
||||
return buffer_state == AUDIOBUF_STATE_TRASHED;
|
||||
}
|
||||
|
||||
|
||||
/** --- Miscellaneous public interfaces --- **/
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@ enum
|
|||
};
|
||||
bool audio_restore_playback(int type); /* Restores the audio buffer to handle the requested playback */
|
||||
size_t audio_get_filebuflen(void);
|
||||
bool audio_buffer_state_trashed(void);
|
||||
|
||||
/* Automatic transition? Only valid to call during the track change events,
|
||||
otherwise the result is undefined. */
|
||||
|
|
|
@ -126,7 +126,6 @@ static void format_line(const struct playlist_entry* track, char* str,
|
|||
|
||||
static bool update_playlist(bool force);
|
||||
static int onplay_menu(int index);
|
||||
static int save_playlist_func(void);
|
||||
|
||||
static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer,
|
||||
int names_buffer_size)
|
||||
|
@ -437,9 +436,6 @@ static bool update_playlist(bool force)
|
|||
return true;
|
||||
}
|
||||
|
||||
MENUITEM_FUNCTION(save_playlist_item, 0, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST),
|
||||
save_playlist_func, 0, NULL, Icon_NOICON);
|
||||
|
||||
/* Menu of playlist commands. Invoked via ON+PLAY on main viewer screen.
|
||||
Returns -1 if USB attached, 0 if no playlist change, and 1 if playlist
|
||||
changed. */
|
||||
|
@ -521,13 +517,6 @@ static int onplay_menu(int index)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Save playlist to disk */
|
||||
static int save_playlist_func(void)
|
||||
{
|
||||
save_playlist_screen(viewer.playlist);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* View current playlist */
|
||||
enum playlist_viewer_result playlist_viewer(void)
|
||||
{
|
||||
|
|
|
@ -617,6 +617,7 @@ void presets_save(void)
|
|||
radio_save_presets();
|
||||
}
|
||||
|
||||
#if 0 /* disabled in draw_progressbar() */
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
static inline void draw_vertical_line_mark(struct screen * screen,
|
||||
int x, int y, int h)
|
||||
|
@ -643,3 +644,4 @@ void presets_draw_markers(struct screen *screen,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -62,7 +62,9 @@ struct fmstation
|
|||
char name[MAX_FMPRESET_LEN+1];
|
||||
};
|
||||
const char* radio_get_preset_name(int preset);
|
||||
#if 0 /* disabled in draw_progressbar() */
|
||||
void presets_draw_markers(struct screen *screen, int x, int y, int w, int h);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ALBUMART
|
||||
void radioart_init(bool entering_screen);
|
||||
|
@ -79,7 +81,6 @@ enum fms_exiting {
|
|||
|
||||
/* only radio.c should be using these! */
|
||||
int fms_do_button_loop(bool update_screen);
|
||||
struct gui_wps *fms_get(enum screen_type screen);
|
||||
void fms_fix_displays(enum fms_exiting toggle_state);
|
||||
|
||||
#endif /* CONFIG_TUNER */
|
||||
|
|
|
@ -125,7 +125,3 @@ int fms_do_button_loop(bool update_screen)
|
|||
return button;
|
||||
}
|
||||
|
||||
struct gui_wps *fms_get(enum screen_type screen)
|
||||
{
|
||||
return skin_get_gwps(FM_SCREEN, screen);
|
||||
}
|
||||
|
|
|
@ -126,20 +126,3 @@ const unsigned char bitmap_icon_disk[12] =
|
|||
{0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Print play mode to status bar
|
||||
*/
|
||||
void statusbar_icon_play_mode(int mode)
|
||||
{
|
||||
lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS,
|
||||
STATUSBAR_Y_POS, ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print shuffle mode to status bar
|
||||
*/
|
||||
void statusbar_icon_shuffle(void)
|
||||
{
|
||||
lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
|
||||
STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);
|
||||
}
|
||||
|
|
|
@ -128,20 +128,6 @@ extern const unsigned char bitmap_icon_disk[];
|
|||
#define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH
|
||||
#define TIME_X_END STATUSBAR_WIDTH-1
|
||||
|
||||
extern void statusbar_wipe(void);
|
||||
extern void statusbar_icon_battery(int percent);
|
||||
extern bool statusbar_icon_volume(int percent);
|
||||
extern void statusbar_icon_play_state(int state);
|
||||
extern void statusbar_icon_play_mode(int mode);
|
||||
extern void statusbar_icon_shuffle(void);
|
||||
extern void statusbar_icon_lock(void);
|
||||
#if CONFIG_RTC
|
||||
extern void statusbar_time(int hour, int minute);
|
||||
#endif
|
||||
#if (CONFIG_LED == LED_VIRTUAL)
|
||||
extern void statusbar_led(void);
|
||||
#endif
|
||||
|
||||
#endif /* End HAVE_LCD_BITMAP */
|
||||
#endif /* PLUGIN */
|
||||
#endif /* _ICONS_H_ */
|
||||
|
|
|
@ -1309,11 +1309,6 @@ static bool check_all_headers(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool tagcache_is_busy(void)
|
||||
{
|
||||
return read_lock || write_lock;
|
||||
}
|
||||
|
||||
bool tagcache_search(struct tagcache_search *tcs, int tag)
|
||||
{
|
||||
struct tagcache_header tag_hdr;
|
||||
|
@ -3303,16 +3298,6 @@ void tagcache_update_numeric(int idx_id, int tag, long data)
|
|||
}
|
||||
#endif /* !__PCTOOL__ */
|
||||
|
||||
long tagcache_get_serial(void)
|
||||
{
|
||||
return current_tcmh.serial;
|
||||
}
|
||||
|
||||
long tagcache_get_commitid(void)
|
||||
{
|
||||
return current_tcmh.commitid;
|
||||
}
|
||||
|
||||
static bool write_tag(int fd, const char *tagstr, const char *datastr)
|
||||
{
|
||||
char buf[512];
|
||||
|
@ -4794,13 +4779,6 @@ void tagcache_stop_scan(void)
|
|||
queue_post(&tagcache_queue, Q_STOP_SCAN, 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_TC_RAMCACHE
|
||||
bool tagcache_is_ramcache(void)
|
||||
{
|
||||
return tc_stat.ramcache;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__PCTOOL__ */
|
||||
|
||||
|
||||
|
|
|
@ -214,7 +214,6 @@ bool tagcache_is_numeric_tag(int type);
|
|||
bool tagcache_find_index(struct tagcache_search *tcs, const char *filename);
|
||||
bool tagcache_check_clauses(struct tagcache_search *tcs,
|
||||
struct tagcache_search_clause **clause, int count);
|
||||
bool tagcache_is_busy(void);
|
||||
bool tagcache_search(struct tagcache_search *tcs, int tag);
|
||||
void tagcache_search_set_uniqbuf(struct tagcache_search *tcs,
|
||||
void *buffer, long length);
|
||||
|
@ -228,7 +227,6 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid,
|
|||
void tagcache_search_finish(struct tagcache_search *tcs);
|
||||
long tagcache_get_numeric(const struct tagcache_search *tcs, int tag);
|
||||
long tagcache_increase_serial(void);
|
||||
long tagcache_get_serial(void);
|
||||
bool tagcache_import_changelog(void);
|
||||
bool tagcache_create_changelog(struct tagcache_search *tcs);
|
||||
void tagcache_update_numeric(int idx_id, int tag, long data);
|
||||
|
@ -244,7 +242,6 @@ void tagcache_screensync_event(void);
|
|||
void tagcache_screensync_enable(bool state);
|
||||
|
||||
#ifdef HAVE_TC_RAMCACHE
|
||||
bool tagcache_is_ramcache(void);
|
||||
#ifdef HAVE_DIRCACHE
|
||||
bool tagcache_fill_tags(struct mp3entry *id3, const char *filename);
|
||||
#endif
|
||||
|
|
10
apps/tree.c
10
apps/tree.c
|
@ -307,16 +307,6 @@ void tree_gui_init(void)
|
|||
}
|
||||
|
||||
|
||||
/* drawer function for the GUI_EVENT_REDRAW callback */
|
||||
void tree_drawlists(void)
|
||||
{
|
||||
/* band-aid to fix the bar/list redrawing properly after leaving a plugin */
|
||||
send_event(GUI_EVENT_THEME_CHANGED, NULL);
|
||||
/* end bandaid */
|
||||
gui_synclist_draw(&tree_lists);
|
||||
}
|
||||
|
||||
|
||||
struct tree_context* tree_get_context(void)
|
||||
{
|
||||
return &tc;
|
||||
|
|
|
@ -105,7 +105,6 @@ struct tree_context {
|
|||
* Call one of the two below after yields since the entrys may move inbetween */
|
||||
struct entry* tree_get_entries(struct tree_context *t);
|
||||
struct entry* tree_get_entry_at(struct tree_context *t, int index);
|
||||
void tree_drawlists(void);
|
||||
void tree_mem_init(void) INIT_ATTR;
|
||||
void tree_gui_init(void) INIT_ATTR;
|
||||
char* get_current_file(char* buffer, size_t buffer_len);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
/** mp3_enc.codec **/
|
||||
|
||||
#if 0 /* Currently unused, left for reference and future use */
|
||||
/* These are in descending order rather than in MPEG frequency index
|
||||
order */
|
||||
const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] =
|
||||
|
@ -35,6 +36,7 @@ const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR] =
|
|||
12000, 11025, 8000, /* MPEG 2.5 */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/* All bitrates used in the MPA L3 standard */
|
||||
const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR] =
|
||||
|
|
|
@ -97,7 +97,9 @@ struct aiff_enc_config
|
|||
/* This number is count of full encoder set */
|
||||
#define MP3_ENC_NUM_SAMPR 6
|
||||
|
||||
#if 0
|
||||
extern const unsigned long mp3_enc_sampr[MP3_ENC_NUM_SAMPR];
|
||||
#endif
|
||||
extern const unsigned long mp3_enc_bitr[MP3_ENC_NUM_BITR];
|
||||
|
||||
struct mp3_enc_config
|
||||
|
|
|
@ -132,7 +132,6 @@ void usb_signal_transfer_completion(
|
|||
struct usb_transfer_completion_event_data *event_data);
|
||||
bool usb_driver_enabled(int driver);
|
||||
bool usb_exclusive_storage(void); /* storage is available for usb */
|
||||
void usb_storage_try_release_storage(void);
|
||||
#endif
|
||||
int usb_release_exclusive_storage(void);
|
||||
|
||||
|
|
|
@ -364,24 +364,6 @@ static bool check_disk_present(IF_MD_NONVOID(int volume))
|
|||
#endif
|
||||
}
|
||||
|
||||
void usb_storage_try_release_storage(void)
|
||||
{
|
||||
/* Check if there is a connected drive left. If not,
|
||||
release excusive access */
|
||||
bool canrelease=true;
|
||||
int i;
|
||||
for(i=0;i<storage_num_drives();i++) {
|
||||
if(!ejected[i] && locked[i]) {
|
||||
canrelease=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(canrelease) {
|
||||
logf("scsi release ata");
|
||||
usb_release_exclusive_storage();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_HOTSWAP
|
||||
void usb_storage_notify_hotswap(int volume,bool inserted)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue