From 2f4521ea9ea3b160c256afb0d210eb8028c8ce5b Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 6 Feb 2007 13:25:57 +0000 Subject: [PATCH] More HAVE_TAGCACHE by Austin Appel git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12213 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 6 ++++++ apps/tree.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/apps/tree.c b/apps/tree.c index 8d70eb8bd4..d39ededea7 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -149,7 +149,9 @@ bool boot_changed = false; char lastfile[MAX_PATH]; static char lastdir[MAX_PATH]; +#ifdef HAVE_TAGCACHE static int lasttable, lastextra, lastfirstpos; +#endif static int max_files = 0; static bool reload_dir = false; @@ -624,10 +626,12 @@ static bool dirbrowse(void) curr_context=CONTEXT_TREE; tc.selected_item = 0; tc.dirlevel=0; +#ifdef HAVE_TAGCACHE tc.firstpos=0; lasttable = -1; lastextra = -1; lastfirstpos = 0; +#endif if (*tc.dirfilter < NUM_FILTER_MODES) { #ifdef HAVE_RECORDING @@ -986,10 +990,12 @@ static bool dirbrowse(void) if ( reload_root ) { strcpy(currdir, "/"); tc.dirlevel = 0; +#ifdef HAVE_TAGCACHE tc.currtable = 0; tc.currextra = 0; lasttable = -1; lastextra = -1; +#endif reload_root = false; } diff --git a/apps/tree.h b/apps/tree.h index ffe6d478c6..003714252e 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -58,11 +58,13 @@ struct tree_context { int filesindir; /* The number of files in the dircache */ int dirsindir; /* file use */ int dirlength; /* total number of entries in dir, incl. those not loaded */ +#ifdef HAVE_TAGCACHE int table_history[MAX_DIR_LEVELS]; /* db use */ int extra_history[MAX_DIR_LEVELS]; /* db use */ int currtable; /* db use */ int currextra; /* db use */ int currextra2; /* db use */ +#endif /* A big buffer with plenty of entry structs, * contains all files and dirs in the current * dir (with filters applied) */