rockbox/apps
William Wilgus 58462184d1 folder_select.c partial rewrite -- remove static, add full notification
| with some code refactoring we can eliminate the static
  char buffer in get_full_path()

  I'm guessing making the functions recursive prompted the static buffer
  I don't see any reason we can't just pass the same buffer
|
  During tested I noted failure after buffer was full
   -- splash added for buffer full notification

  added some logic to not add partial entries and try to find a
| selected item that will fit in the remaing buffer
------------------------------------------------------------------------

While looking through the source I noticed a few potential
pitfalls with the current code.

Namely the stack allocated temporary buffer
sized to setting_len.

I also noted the rigid vect[32] with the timeless --
/* 32 separate folders should be Enough For Everybody(TM) */
and decided to make it a bit more robust

The saved items are hashed with crc32 on all the paths
and a hashed_len is kept to aid in the buffer full message before the
user actually goes to save the changes
(assuming they even get the message)

In the old code, buffer might be the same since it ran out of
space and didn't get their later selections

the hashed_len could easily be turned into a way to get a needed buffer
size as well for someone in the future just pass a really large maxlen

I made get_full_path non recursive since it liked to blow the stack
while embedded in all the other recursive calls making it a pain to debug
(the real reason the buffer was static?)
traverse first from the current folder to root mutating the
parent pointers to point at the previous child
next traverse back to the folder unmutating & taking names on the way

Folder depth is now uint16 65535 levels is probably excessive
children_count is also uint16 as well
I made the first folders below root '/' stay below root
instead of shifting since the horizontal real estate is limited

slightly smaller than it began but hopefully faster & more reliable

Change-Id: I348f61baf865cccdeacddfd9d50641a882e890fc
2021-11-10 02:34:06 -05:00
..
bitmaps Rename symbols of FiiO M3K Linux-based port 2021-02-27 23:53:28 +00:00
gui folder_select.c partial rewrite -- remove static, add full notification 2021-11-10 02:34:06 -05:00
hosted/android keyboard add ability to specify temporary custom layouts 2020-07-22 06:48:28 -04:00
iap FS#13287 - Load a newly saved playlist and resume where it was 2021-05-03 20:10:27 +00:00
keymaps fiiom3k (keymap): Allow scrolling up/down in keyboard context 2021-11-08 14:25:53 -05:00
lang Add single playback mode 2021-11-05 09:20:04 -04:00
menus Add single playback mode 2021-11-05 09:20:04 -04:00
plugins 2048 plugin: Fix disappearing numbers (FS#13303) 2021-11-09 10:30:28 -05:00
radio Fix red in bc416ff590 2021-04-10 21:06:41 -04:00
recorder Plugin Api add core bitmaps 2021-08-26 12:55:34 +00:00
abrepeat.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
abrepeat.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
action.c touchscreen: Fix softlock handling 2021-08-14 09:42:04 +00:00
action.h Softlock Improvements 2021-06-04 00:00:57 +00:00
alarm_menu.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
alarm_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
appevents.h Get voice event out of playback.c 2017-12-12 20:28:56 -05:00
applimits.h Remove two unused defines. 2010-08-21 15:49:42 +00:00
apps.make Android: use APPEXTRA instead of makefile hack 2011-03-11 16:08:36 +00:00
audio_path.c nwza860: fix simulator build 2020-10-19 03:39:33 +00:00
audio_thread.c Get voice event out of playback.c 2017-12-12 20:28:56 -05:00
audio_thread.h Update software recording engine to latest codec interface. 2013-06-30 00:40:27 +02:00
beep.c Enable setting of global output samplerate on certain targets. 2013-07-06 04:22:04 +02:00
bookmark.c whitespace fixes 2021-10-21 22:42:01 +02:00
bookmark.h Fix minor bookmark problems/Enhance bookmark functions 2012-03-12 08:54:02 +01:00
buffering.c Remove execute bit from file permissions from recent commit 2021-03-02 02:10:53 +00:00
buffering.h Remove execute bit from file permissions from recent commit 2021-03-02 02:10:53 +00:00
codec_thread.c codec_thread.c don't overrun audio_formats[] array 2021-08-11 10:56:14 -04:00
codec_thread.h Update software recording engine to latest codec interface. 2013-06-30 00:40:27 +02:00
codecs.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
core_asmdefs.c Remove more tabs 2010-02-07 18:38:47 +00:00
cuesheet.c whitespace fixes 2021-10-21 22:42:01 +02:00
cuesheet.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
debug_menu.c Add ability to dump cpu boost log to disk, include thread names 2021-09-30 21:13:22 -04:00
debug_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
enc_config.c enc_config.c don't overrun mp3_enc_bitr[] array 2021-08-11 11:00:03 -04:00
enc_config.h Fix menu warnings 2018-10-18 00:06:31 +02:00
features.txt New port: Shanling Q1 native 2021-07-13 22:01:33 +01:00
filetree.c exit file browser before running plugins 2021-10-31 21:49:31 -04:00
filetree.h FS#13287 - Load a newly saved playlist and resume where it was 2021-05-03 20:10:27 +00:00
filetypes.c file tree filetype_list_viewers exit from list before execution 2021-10-21 03:16:54 -04:00
filetypes.h filetree.c move static and stack allocated buffers around 2021-10-20 16:05:21 -04:00
fracmul.h Build librbcodec with DSP and metadata. 2012-03-18 12:00:39 +01:00
keyboard.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
language.c language.c fix possible buffer overrun 2021-08-03 00:57:35 +00:00
language.h
logfdisp.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
logfdisp.h
main.c Drop HAVE_RTC_RAM 2021-08-15 20:41:58 +01:00
menu.c PLUGINBROWSER make resumable 2021-10-29 03:07:42 -04:00
menu.h do_menu pass internal synclist reference to callback 2020-07-19 22:10:26 +00:00
misc.c misc.c strip_extension() cleanup 2021-08-17 08:28:23 -04:00
misc.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
onplay.c Fix: Reset onplay-context for playlist viewer 2021-11-03 13:28:10 -04:00
onplay.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
open_plugin.c root_menu.c fix recent regression for shortcuts add resume for plugins 2021-11-07 01:49:15 -05:00
open_plugin.h Open Plugins Ignore hash for lang Ids 2021-10-23 02:45:54 -04:00
pcmbuf.c Add single playback mode 2021-11-05 09:20:04 -04:00
pcmbuf.h Fix a problem with audio not starting on a list of short files 2017-04-06 19:32:35 -04:00
playback.c Add single playback mode 2021-11-05 09:20:04 -04:00
playback.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
playlist.c Dir cache: Fix resume of relative path playlists. 2021-09-19 21:05:58 -04:00
playlist.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
playlist_catalog.c playlist_catalog fix strcpy overlap, potential buffer overrun 2021-08-02 02:27:43 +00:00
playlist_catalog.h FS#11808 - Major playlist handling changes (on disk playlists) 2011-07-20 14:11:15 +00:00
playlist_menu.h
playlist_viewer.c whitespace fixes 2021-10-21 22:42:01 +02:00
playlist_viewer.h FS#11808 - Major playlist handling changes (on disk playlists) 2011-07-20 14:11:15 +00:00
plugin.c plugin.h change plugin_open() path and parameter to const 2021-10-22 23:17:33 -04:00
plugin.h plugin.h change plugin_open() path and parameter to const 2021-10-22 23:17:33 -04:00
rbcodec_helpers.c Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL 2012-05-09 14:32:38 +02:00
rbcodecconfig.h kernel: Break out kernel primitives into separate files and move to separate dir. 2014-03-03 18:11:57 +01:00
rbcodecplatform.h rbcodec: abstract tdspeed buffer allocation 2012-05-07 10:29:07 +02:00
README
root_menu.c plugin_screen don't save settings on every plugin execution 2021-11-07 12:48:46 -05:00
root_menu.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
screen_access.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screen_access.h Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screens.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screens.h [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
scrobbler.c misc: Only include rbpaths.h and string-extra.h in places that need it 2021-04-10 12:08:12 -04:00
scrobbler.h Get rid of some superfluous single-purpose functions in playback. 2013-07-13 00:08:51 -04:00
settings.c RFC settings & nvram.bin save setting to tmp file save old 2021-11-08 16:15:47 -05:00
settings.h Add single playback mode 2021-11-05 09:20:04 -04:00
settings_list.c Add single playback mode 2021-11-05 09:20:04 -04:00
settings_list.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
shortcuts.c shortcuts: fix file handle leak on OOM condition 2021-07-25 14:53:00 +01:00
shortcuts.h shortcuts: talk the time and configure the sleep timeout 2011-12-08 10:23:46 +00:00
sound_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
SOURCES Remove Samsung YP-Z5 port 2021-08-14 14:13:54 +01:00
status.c [2/4] get rid of HAVE_LCD_CHARCELLS 2020-07-24 21:20:13 +00:00
status.h [2/4] get rid of HAVE_LCD_CHARCELLS 2020-07-24 21:20:13 +00:00
tagcache.c Database: Fix tag_albumartist; new tag_virt_canonicalartist. 2021-09-17 21:42:05 -04:00
tagcache.h Database: Fix tag_albumartist; new tag_virt_canonicalartist. 2021-09-17 21:42:05 -04:00
tagnavi.config Database: Merge 'Album Artist' entry with 'Artist' entry. 2021-09-17 21:42:05 -04:00
tagtree.c Database: Fix tag_albumartist; new tag_virt_canonicalartist. 2021-09-17 21:42:05 -04:00
tagtree.h Fix menu warnings 2018-10-18 00:06:31 +02:00
talk.c voice: Allow voiced date format to be overridden 2021-09-28 21:58:11 -04:00
talk.h talk: Explicitly cast -1 as unsigned before a left shift. 2021-07-20 00:09:33 +00:00
tree.c Use USB events for storing plugin_menu state 2021-10-31 12:42:24 -04:00
tree.h Fix tree.c->tree_get_entry_at() buffer overflow 2018-12-14 01:28:17 -06:00
usb_keymaps.c Document intentional fallthroughs + fix harmless unintended ones 2021-08-04 18:59:46 +00:00
usb_keymaps.h
voice_thread.c voice_thread.c ensure cpu gets re-boosted after Q_VOICE_STOP event 2021-09-29 01:18:00 -04:00
voice_thread.h voice: Allow voice prompt volume to be configurable 2021-03-07 12:51:36 +00:00

For general information see: docs/README
For API information see: docs/API