1 #include <glib.h>
2 #include <girepository.h>
3 #include <libinstpatch/libinstpatch.h>
4 
5 
6 int
main(int argc,char * argv[])7 main(int argc, char *argv[])
8 {
9     GError *err = NULL;
10     char *irdump = NULL;
11     GOptionContext *context;
12 
13     GOptionEntry entries[] =
14     {
15         { "introspect-dump", 'i', 0, G_OPTION_ARG_STRING, &irdump, NULL, NULL },
16         { NULL }
17     };
18 
19     context = g_option_context_new(NULL);
20     g_option_context_add_main_entries(context, entries, "libinstpatch-gir-program");
21 
22     if(!g_option_context_parse(context, &argc, &argv, &err))
23     {
24         g_print("option parsing failed: %s\n", err->message);
25         return (1);
26     }
27 
28     ipatch_init();
29 
30     if(!g_irepository_dump(irdump, &err))
31     {
32         g_print("g_irepository_dump() failed: %s\n", err->message);
33         return (1);
34     }
35 
36     return (0);
37 }
38 
39