mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
girepository: Cleanup compiler.c formatting
This commit is contained in:
parent
5d997cad03
commit
3bd7635516
@ -26,14 +26,14 @@
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gio/gio.h>
|
||||
#include <girepository.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include "girmodule-private.h"
|
||||
@ -77,9 +77,13 @@ write_out_typelib (gchar *prefix,
|
||||
else
|
||||
{
|
||||
if (prefix)
|
||||
{
|
||||
filename = g_strdup_printf ("%s-%s", prefix, output);
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = g_strdup (output);
|
||||
}
|
||||
file_obj = g_file_new_for_path (filename);
|
||||
tmp_filename = g_strdup_printf ("%s.tmp", filename);
|
||||
tmp_file_obj = g_file_new_for_path (tmp_filename);
|
||||
@ -94,7 +98,8 @@ write_out_typelib (gchar *prefix,
|
||||
}
|
||||
|
||||
written = fwrite (typelib->data, 1, typelib->len, file);
|
||||
if (written < typelib->len) {
|
||||
if (written < typelib->len)
|
||||
{
|
||||
g_fprintf (stderr, "ERROR: Could not write the whole output: %s",
|
||||
strerror (errno));
|
||||
goto out;
|
||||
@ -123,18 +128,17 @@ out:
|
||||
|
||||
GLogLevelFlags logged_levels;
|
||||
|
||||
static void log_handler (const gchar *log_domain,
|
||||
static void
|
||||
log_handler (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
||||
if (log_level & logged_levels)
|
||||
g_log_default_handler (log_domain, log_level, message, user_data);
|
||||
}
|
||||
|
||||
static GOptionEntry options[] =
|
||||
{
|
||||
static GOptionEntry options[] = {
|
||||
{ "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, "include directories in GIR search path", NULL },
|
||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, "output file", "FILE" },
|
||||
{ "module", 'm', 0, G_OPTION_ARG_STRING, &mname, "module to compile", "NAME" },
|
||||
|
Loading…
Reference in New Issue
Block a user