summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-08-06 16:54:57 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-08-06 16:54:57 (GMT)
commit4fcc35a52ccb025b6d803d85e017931cd2452960 (patch)
treee95920f16c273e41f9cae1ea2f02571c221a514e /src/core
parent74d062d4ec55d7ac3914bbf64b8b6c5ab52227df (diff)
Extend the ROST grammar with a first batch of new features.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c
index 8d4daa7..26469ff 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -41,6 +41,9 @@
#include "processors.h"
#include "queue.h"
#include "../analysis/scan/core.h"
+#ifdef HAVE_MAGIC_SUPPORT
+# include "../analysis/scan/items/magic/cookie.h"
+#endif
#include "../common/io.h"
#include "../common/xdg.h"
#include "../glibext/linesegment.h"
@@ -102,6 +105,10 @@ bool load_all_core_components(bool cs)
explorer = g_content_explorer_new();
set_current_content_explorer(explorer);
+#ifdef HAVE_MAGIC_SUPPORT
+ if (result) result = init_magic_cookie();
+#endif
+
resolver = g_content_resolver_new();
set_current_content_resolver(resolver);
@@ -152,6 +159,10 @@ void unload_all_core_components(bool cs)
set_rost_root_namespace(NULL);
+#ifdef HAVE_MAGIC_SUPPORT
+ exit_magic_cookie();
+#endif
+
set_current_content_resolver(NULL);
set_current_content_explorer(NULL);