eliminate old text searching thread code

This commit is contained in:
Ryan Fleury
2024-03-29 11:28:45 -07:00
parent 8c5c0be040
commit eec124c53b
3 changed files with 0 additions and 431 deletions
-76
View File
@@ -47,71 +47,6 @@ struct DF_StringBindingPair
DF_Binding binding;
};
////////////////////////////////
//~ rjf: Text Searching Types
typedef struct DF_TextSearchMatch DF_TextSearchMatch;
struct DF_TextSearchMatch
{
TxtPt pt;
};
typedef struct DF_TextSearchMatchChunkNode DF_TextSearchMatchChunkNode;
struct DF_TextSearchMatchChunkNode
{
DF_TextSearchMatchChunkNode *next;
DF_TextSearchMatch *v;
U64 count;
U64 cap;
};
typedef struct DF_TextSearchMatchChunkList DF_TextSearchMatchChunkList;
struct DF_TextSearchMatchChunkList
{
DF_TextSearchMatchChunkNode *first;
DF_TextSearchMatchChunkNode *last;
U64 node_count;
U64 total_count;
};
typedef struct DF_TextSearchMatchArray DF_TextSearchMatchArray;
struct DF_TextSearchMatchArray
{
DF_TextSearchMatch *v;
U64 count;
};
typedef struct DF_TextSearchCacheNode DF_TextSearchCacheNode;
struct DF_TextSearchCacheNode
{
// rjf: links
DF_TextSearchCacheNode *next;
DF_TextSearchCacheNode *prev;
// rjf: allocation
Arena *arena;
// rjf: search parameters
U128 hash;
String8 needle;
DF_TextSliceFlags flags;
TxtPt start_pt;
// rjf: search results
B32 good;
DF_TextSearchMatchChunkList search_matches;
// rjf: last time touched
U64 last_time_touched_us;
};
typedef struct DF_TextSearchCacheSlot DF_TextSearchCacheSlot;
struct DF_TextSearchCacheSlot
{
DF_TextSearchCacheNode *first;
DF_TextSearchCacheNode *last;
};
////////////////////////////////
//~ rjf: Key Map Types
@@ -985,17 +920,6 @@ internal void df_set_autocomp_lister_query(DF_Window *ws, UI_Key root_key, DF_Ct
internal void df_set_search_string(String8 string);
internal String8 df_push_search_string(Arena *arena);
////////////////////////////////
//~ rjf: Text Searching
internal void df_text_search_match_chunk_list_push(Arena *arena, DF_TextSearchMatchChunkList *list, U64 cap, DF_TextSearchMatch *match);
internal DF_TextSearchMatchArray df_text_search_match_array_from_chunk_list(Arena *arena, DF_TextSearchMatchChunkList *chunks);
internal U64 df_text_search_little_hash_from_hash(U128 hash);
internal void df_text_search_thread_entry_point(void *p);
internal int df_text_search_match_array_qsort_compare(TxtPt *a, TxtPt *b);
internal void df_text_search_match_array_sort_in_place(DF_TextSearchMatchArray *array);
internal DF_TextSearchMatch df_text_search_match_array_find_nearest__linear_scan(DF_TextSearchMatchArray *array, TxtPt pt, Side side);
////////////////////////////////
//~ rjf: Colors, Fonts, Config