diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
commit | 4fcc35a52ccb025b6d803d85e017931cd2452960 (patch) | |
tree | e95920f16c273e41f9cae1ea2f02571c221a514e /src/rost.c | |
parent | 74d062d4ec55d7ac3914bbf64b8b6c5ab52227df (diff) |
Extend the ROST grammar with a first batch of new features.
Diffstat (limited to 'src/rost.c')
-rw-r--r-- | src/rost.c | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -275,31 +275,33 @@ int main(int argc, char **argv) set_log_verbosity(verbosity); - /* - if (!load_all_core_components(false)) + if (!load_all_core_components(true)) goto done; - */ /* Traitement des recherches */ scanner = g_content_scanner_new_from_file(rules); - content = g_file_content_new(target); + if (scanner != NULL) + { + content = g_file_content_new(target); + + context = g_content_scanner_analyze(scanner, options, content); - context = g_content_scanner_analyze(scanner, options, content); + g_scan_context_display(context); - g_scan_context_display(context); + g_object_unref(G_OBJECT(context)); + g_object_unref(G_OBJECT(content)); - g_object_unref(G_OBJECT(context)); - g_object_unref(G_OBJECT(content)); + g_object_unref(G_OBJECT(scanner)); - g_object_unref(G_OBJECT(scanner)); + } g_object_unref(G_OBJECT(options)); /* Sortie */ - //unload_all_core_components(false); + unload_all_core_components(false); #ifdef TRACK_GOBJECT_LEAKS remember_gtypes_for_leaks(); |