summaryrefslogtreecommitdiff
path: root/tags.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 12:16:35 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 12:16:35 -0500
commit02ee27233b43eba648e5a9060fe269df963b9844 (patch)
tree97a9442c3c3e97d9e7738de6ca76a50a284ba263 /tags.c
parentc42ae4ebf14388ff568ad005a94b07aba0824d31 (diff)
restructure tags.c, menu.c
Diffstat (limited to 'tags.c')
-rw-r--r--tags.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tags.c b/tags.c
index df1fa60..efbf5e2 100644
--- a/tags.c
+++ b/tags.c
@@ -1,3 +1,5 @@
+#include "ted.h"
+
static const char *tags_filename(Ted *ted, bool error_if_does_not_exist) {
change_directory(ted->cwd);
const char *filename = "tags";
@@ -93,7 +95,7 @@ static void tags_generate_at_dir(Ted *ted, bool run_in_build_window, const char
}
// generate/re-generate tags.
-static void tags_generate(Ted *ted, bool run_in_build_window) {
+void tags_generate(Ted *ted, bool run_in_build_window) {
const char *filename = tags_filename(ted, false);
if (!filename) {
strcpy(ted->tags_dir, ted->cwd);
@@ -131,9 +133,6 @@ static int tag_try(FILE *fp, const char *tag) {
return -1;
}
-// finds all tags beginning with the given prefix, returning them into *out, writing at most out_size entries.
-// you may pass NULL for out, in which case just the number of matching tags is returned (still maxing out at out_size)
-// each element in out should be freed when you're done with them
size_t tags_beginning_with(Ted *ted, const char *prefix, char **out, size_t out_size) {
assert(out_size);
const char *tags_name = tags_filename(ted, true);