mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Cleanup tree.c cache handling a bit.
* Rename stuff to not re-use the term dircache * Move cache to own struct * Encapsulate retrieving entries a bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30242 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fa5cf8edea
commit
98096970e0
9 changed files with 74 additions and 69 deletions
18
apps/tree.h
18
apps/tree.h
|
@ -38,6 +38,15 @@ struct entry {
|
|||
#define BROWSE_SELECTED 0x0100 /* this bit is set if user selected item */
|
||||
|
||||
struct tree_context;
|
||||
struct tree_cache {
|
||||
/* A big buffer with plenty of entry structs,
|
||||
* contains all files and dirs in the current
|
||||
* dir (with filters applied) */
|
||||
void* entries;
|
||||
char* name_buffer;
|
||||
int max_entries; /* Max entries in the cache */
|
||||
int name_buffer_size; /* in bytes */
|
||||
};
|
||||
|
||||
struct browse_context {
|
||||
int dirfilter;
|
||||
|
@ -80,14 +89,7 @@ struct tree_context {
|
|||
int currtable; /* db use */
|
||||
int currextra; /* db use */
|
||||
#endif
|
||||
/* A big buffer with plenty of entry structs,
|
||||
* contains all files and dirs in the current
|
||||
* dir (with filters applied) */
|
||||
void* dircache;
|
||||
int dircache_count; /* Number of entries in dircache */
|
||||
char* name_buffer;
|
||||
int name_buffer_size;
|
||||
int dentry_size;
|
||||
struct tree_cache cache;
|
||||
bool dirfull;
|
||||
int sort_dir; /* directory sort order */
|
||||
struct browse_context *browse;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue