From 122bdfd5d9586e4897db0b04e235d10c11434195 Mon Sep 17 00:00:00 2001 From: ketmar Date: Sun, 29 Sep 2013 13:07:03 +0000 Subject: [PATCH] cosmetix in tagdb dox; removed unused function FossilOrigin-Name: b199cb0ba6f9394100e08a84e84119664968786b22bce70c8667a35d3ee800ea --- dox/tagdb_fmt.txt | 8 ++++---- src/search.c | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/dox/tagdb_fmt.txt b/dox/tagdb_fmt.txt index 8adc4bc..5f5b3ed 100644 --- a/dox/tagdb_fmt.txt +++ b/dox/tagdb_fmt.txt @@ -1,7 +1,7 @@ 'dq' means uint64_t stringidx is just an offset in 'string data'; all strings are 0-terminated; -before each string one can found it's length without trailing zero as dw. +before each string one can find it's length without trailing zero as dw. db 'MTD0' @@ -26,13 +26,13 @@ dd tagidx(t_tag_count) file info (for each file, names should be unique): dd real_name_stringidx dd short_name_stringidx ; this MUST be unique, it's used as 'file id' everywhere -; file info (this fields are taken from stat() directry) +; file info (this fields are taken from stat() directly) dq devid ; can be 0, it means 'undefined/unknown' dq inode ; can be 0, it means 'undefined/unknown' dq size ; can be 0, it means 'undefined/unknown' dq mtime ; can be 0, it means 'undefined/unknown' db tracknum ; 0: unknown; this can be used to generate short file names -dw year ; 0: unknown; else: should be normalized +dw year ; 0: unknown; else: must be already normalized dd year_tagid ; yes, years have their own textual tags, along with 'unknown year' ; pair of tags; there can't be undefined tags, all undefined ones will be mapped to 'unknown_xxx' ; this is INDICIES @@ -49,7 +49,7 @@ the following repeats 9 times, for year, artist_o, artist_t, album_o, album_t, t dd ofsidx ; index in 'offsets' -ofs info: +ofs info (offsets): dd fileidx(ofs_bytes/4) diff --git a/src/search.c b/src/search.c index cf9500d..4a8f080 100644 --- a/src/search.c +++ b/src/search.c @@ -212,15 +212,6 @@ typedef struct { } u32value_t; -static inline int is_file_in_tfl (const fl_tfl_t *tfl, uint32_t fidx) { - return bsearch(&fidx, tfl_data+tfl->idx, tfl->count, sizeof(uint32_t), lambda(int, (const void *p0, const void *p1) { - uint32_t v0 = *((const uint32_t *)p0); - uint32_t v1 = *((const uint32_t *)p1); - return (v0 < v1 ? -1 : (v0 > v1 ? 1 : 0)); - })) != NULL; -} - - static inline int zdifsign (uint32_t n0, uint32_t n1) { return (n0 < n1 ? -1 : (n0 > n1 ? 1 : 0)); } -- 2.11.4.GIT