Add gobject-introspection.changes file
[profile/ivi/gobject-introspection.git] / girepository / gi-dump-types.c
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 #include "gdump.c"
3 #include <gio/gunixoutputstream.h>
4
5 int
6 main (int    argc,
7       char **argv)
8 {
9   int i;
10   GOutputStream *stdout;
11   GModule *self;
12
13   g_type_init ();
14
15   stdout = g_unix_output_stream_new (1, FALSE);
16
17   self = g_module_open (NULL, 0);
18
19   for (i = 1; i < argc; i++)
20     {
21       GError *error = NULL;
22       GType type;
23
24       type = invoke_get_type (self, argv[i], &error);
25       if (!type)
26         {
27           g_printerr ("%s\n", error->message);
28           g_clear_error (&error);
29         }
30       else
31         dump_type (type, argv[i], stdout);
32     }
33
34   return 0;
35 }