mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Remove most global variables
2008-03-11 Johan Dahlin <johan@gnome.org> * tools/compiler.c: * tools/generate.c: Remove most global variables svn path=/trunk/; revision=153
This commit is contained in:
parent
cff3cc7ad9
commit
c7c1c96c2b
@ -30,9 +30,8 @@
|
|||||||
#include "girepository.h"
|
#include "girepository.h"
|
||||||
#include "gmetadata.h"
|
#include "gmetadata.h"
|
||||||
|
|
||||||
gboolean raw = FALSE;
|
/* FIXME: Avoid global */
|
||||||
gchar **input = NULL;
|
static gchar *output = NULL;
|
||||||
gchar *output = NULL;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_type_name (const gchar *namespace,
|
write_type_name (const gchar *namespace,
|
||||||
@ -1104,14 +1103,6 @@ write_repository (GIRepository *repository,
|
|||||||
g_strfreev (namespaces);
|
g_strfreev (namespaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GOptionEntry options[] =
|
|
||||||
{
|
|
||||||
{ "raw", 0, 0, G_OPTION_ARG_NONE, &raw, "handle raw metadata", NULL },
|
|
||||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
|
|
||||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
|
|
||||||
{ NULL, }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const guchar *
|
static const guchar *
|
||||||
load_metadata (const gchar *filename,
|
load_metadata (const gchar *filename,
|
||||||
GModule **dlhandle,
|
GModule **dlhandle,
|
||||||
@ -1152,11 +1143,20 @@ load_metadata (const gchar *filename,
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
gboolean raw = FALSE;
|
||||||
|
gchar **input = NULL;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gboolean needs_prefix;
|
gboolean needs_prefix;
|
||||||
gint i;
|
gint i;
|
||||||
GMetadata *data;
|
GMetadata *data;
|
||||||
|
GOptionEntry options[] =
|
||||||
|
{
|
||||||
|
{ "raw", 0, 0, G_OPTION_ARG_NONE, &raw, "handle raw metadata", NULL },
|
||||||
|
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
|
||||||
|
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
|
||||||
|
{ NULL, }
|
||||||
|
};
|
||||||
|
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user