summaryrefslogtreecommitdiff
path: root/examples/dte/tag.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
commit1566b6faa8534118c3566188181367cd0868468f (patch)
tree1de8d4b369efb5e592685a31088f798a6b63ffa1 /examples/dte/tag.h
parent349991bf6efe473ab9a5cbdae0a8114d72b997e3 (diff)
downloadcrep-1566b6faa8534118c3566188181367cd0868468f.tar.gz
Added partial matching and introduced threads
Diffstat (limited to 'examples/dte/tag.h')
-rw-r--r--examples/dte/tag.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/dte/tag.h b/examples/dte/tag.h
new file mode 100644
index 0000000..eddc04a
--- /dev/null
+++ b/examples/dte/tag.h
@@ -0,0 +1,23 @@
+#ifndef TAG_H
+#define TAG_H
+
+#include <sys/types.h>
+#include "ctags.h"
+#include "msg.h"
+#include "util/macros.h"
+#include "util/ptr-array.h"
+#include "util/string-view.h"
+
+typedef struct {
+ char *filename;
+ char *buf;
+ size_t size;
+ time_t mtime;
+} TagFile;
+
+void add_message_for_tag(MessageArray *messages, Tag *tag, const StringView *dir) NONNULL_ARGS;
+size_t tag_lookup(TagFile *tf, const StringView *name, const char *filename, MessageArray *messages) NONNULL_ARG(1, 2, 4);
+void collect_tags(TagFile *tf, PointerArray *a, const StringView *prefix) NONNULL_ARGS;
+void tag_file_free(TagFile *tf) NONNULL_ARGS;
+
+#endif