aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2009-11-11 05:08:17 +0800
committerTor Lillqvist <tml@iki.fi>2009-11-11 21:29:52 +0800
commita7f8b56ec460763c644a948cbb8f3aada0cc7087 (patch)
tree1556f11f8710a40d7a5809616e3f7bde56cf50c4 /shell
parent123923059156c564ccf1fb46aa92675f644ce6bf (diff)
downloadgsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar.gz
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar.bz2
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar.lz
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar.xz
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.tar.zst
gsoc2013-evolution-a7f8b56ec460763c644a948cbb8f3aada0cc7087.zip
Rearrange variables and Windows-only code to avoid warning
Diffstat (limited to 'shell')
-rw-r--r--shell/main.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/shell/main.c b/shell/main.c
index 491865532b..cb7cee4f59 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -466,9 +466,19 @@ create_default_shell (void)
g_idle_add ((GSourceFunc) idle_cb, remaining_args);
}
+#ifdef G_OS_WIN32
+extern void link_shutdown (void);
+#endif
+
gint
main (gint argc, gchar **argv)
{
+ GConfClient *client;
+#ifdef DEVELOPMENT
+ gboolean skip_warning_dialog;
+#endif
+ GError *error = NULL;
+
#ifdef G_OS_WIN32
if (fileno (stdout) != -1 && _get_osfhandle (fileno (stdout)) != -1) {
/* stdout is fine, presumably redirected to a file or pipe */
@@ -479,23 +489,14 @@ main (gint argc, gchar **argv)
(AttachConsole_t) GetProcAddress (
GetModuleHandle ("kernel32.dll"), "AttachConsole");
- if (p_AttachConsole != NULL && p_AttachConsole (ATTACH_PARENT_PROCESS))
- {
+ if (p_AttachConsole != NULL && p_AttachConsole (ATTACH_PARENT_PROCESS)) {
freopen ("CONOUT$", "w", stdout);
dup2 (fileno (stdout), 1);
freopen ("CONOUT$", "w", stderr);
dup2 (fileno (stderr), 2);
}
}
-
- extern void link_shutdown (void);
-#endif
-
- GConfClient *client;
-#ifdef DEVELOPMENT
- gboolean skip_warning_dialog;
#endif
- GError *error = NULL;
/* Make ElectricFence work. */
free (malloc (10));