Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 : : * GObject introspection: typelib validation, auxiliary functions
3 : : * related to the binary typelib format
4 : : *
5 : : * Copyright (C) 2011 Colin Walters
6 : : * Copyright (C) 2020 Gisle Vanem
7 : : *
8 : : * SPDX-License-Identifier: LGPL-2.1-or-later
9 : : *
10 : : * This library is free software; you can redistribute it and/or
11 : : * modify it under the terms of the GNU Lesser General Public
12 : : * License as published by the Free Software Foundation; either
13 : : * version 2 of the License, or (at your option) any later version.
14 : : *
15 : : * This library is distributed in the hope that it will be useful,
16 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 : : * Lesser General Public License for more details.
19 : : *
20 : : * You should have received a copy of the GNU Lesser General Public
21 : : * License along with this library; if not, write to the
22 : : * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 : : * Boston, MA 02111-1307, USA.
24 : : */
25 : :
26 : : #include "gdump.c"
27 : :
28 : : int
29 : 0 : main (int argc,
30 : : char **argv)
31 : : {
32 : : int i;
33 : : GModule *self;
34 : :
35 : 0 : self = g_module_open (NULL, 0);
36 : :
37 : 0 : for (i = 1; i < argc; i++)
38 : : {
39 : 0 : GError *error = NULL;
40 : : GType type;
41 : :
42 : 0 : type = invoke_get_type (self, argv[i], &error);
43 : 0 : if (!type)
44 : : {
45 : 0 : g_printerr ("%s\n", error->message);
46 : 0 : g_clear_error (&error);
47 : : }
48 : : else
49 : 0 : dump_type (type, argv[i], stdout);
50 : : }
51 : :
52 : 0 : return 0;
53 : : }
|