summaryrefslogtreecommitdiff
path: root/plugins/kaitai/rost/space.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kaitai/rost/space.c')
-rw-r--r--plugins/kaitai/rost/space.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/kaitai/rost/space.c b/plugins/kaitai/rost/space.c
index ed24562..ee922d2 100644
--- a/plugins/kaitai/rost/space.c
+++ b/plugins/kaitai/rost/space.c
@@ -27,7 +27,9 @@
#include <string.h>
+#include "trigger.h"
#include "space-int.h"
+#include "../import.h"
@@ -226,14 +228,26 @@ static bool g_kaitai_namespace_resolve(GKaitaiNamespace *item, const char *targe
{
bool result; /* Bilan à retourner */
GScanRegisteredItemClass *parent; /* Version de classe parente */
+ GKaitaiStruct *kstruct; /* Lecteur de définition */
parent = G_SCAN_REGISTERED_ITEM_CLASS(g_kaitai_namespace_parent_class);
result = parent->resolve(G_SCAN_REGISTERED_ITEM(item), target, ctx, scope, out);
-
if (!result)
- printf("NEED external def!!!!\n");
+ {
+ kstruct = load_kaitai_definition(target, NULL);
+
+ if (kstruct != NULL)
+ {
+ *out = g_kaitai_trigger_new(kstruct);
+ result = true;
+
+ g_object_unref(G_OBJECT(kstruct));
+
+ }
+
+ }
return result;