Editor: reduce scope of some functions.
[midnight-commander.git] / lib / global.c
blob3466ad26eba5f2abc7125c7c4a20b7820ae1279c
1 /* GLIB - Library of useful routines for C programming
2 Copyright (C) 2009
3 Free Software Foundation, Inc.
5 Written by:
6 Slava Zanko <slavazanko@gmail.com>, 2009.
8 This file is part of the Midnight Commander.
10 The Midnight Commander is free software; you can redistribute it
11 and/or modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2 of the
13 License, or (at your option) any later version.
15 The Midnight Commander is distributed in the hope that it will be
16 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 MA 02110-1301, USA.
26 /** \file glibcompat.c
27 * \brief Source: compatibility with older versions of glib
29 * Following code was copied from glib to GNU Midnight Commander to
30 * provide compatibility with older versions of glib.
33 #include <config.h>
35 #include "global.h"
38 /* *INDENT-OFF* */
39 #ifdef HAVE_SUBSHELL_SUPPORT
40 # ifdef SUBSHELL_OPTIONAL
41 # define SUBSHELL_USE FALSE
42 # else /* SUBSHELL_OPTIONAL */
43 # define SUBSHELL_USE TRUE
44 # endif /* SUBSHELL_OPTIONAL */
45 #else /* !HAVE_SUBSHELL_SUPPORT */
46 # define SUBSHELL_USE FALSE
47 #endif /* !HAVE_SUBSHELL_SUPPORT */
48 /* *INDENT-ON* */
50 /*** global variables ****************************************************************************/
52 /* *INDENT-OFF* */
53 mc_global_t mc_global = {
54 #ifdef WITH_BACKGROUND
55 .we_are_background = 0,
56 #endif /* WITH_BACKGROUND */
58 .message_visible = 1,
59 .keybar_visible = 1,
60 .mc_run_mode = MC_RUN_FULL,
62 #ifdef HAVE_CHARSET
63 .source_codepage = -1,
64 .display_codepage = -1,
65 #else
66 .eight_bit_clean = 1,
67 .full_eight_bits = 0,
68 #endif /* !HAVE_CHARSET */
70 .utf8_display = 0,
71 .sysconfig_dir = NULL,
72 .share_data_dir = NULL,
74 .is_right = FALSE,
76 .skin = NULL,
78 .widget =
80 .midnight_shutdown = FALSE,
81 .confirm_history_cleanup = TRUE,
82 .show_all_if_ambiguous = FALSE
85 .tty =
87 .setup_color_string = NULL,
88 .term_color_string = NULL,
89 .color_terminal_string = NULL,
90 #ifndef LINUX_CONS_SAVER_C
91 .console_flag = '\0',
92 #endif /* !LINUX_CONS_SAVER_C */
94 .use_subshell = SUBSHELL_USE,
96 #ifdef HAVE_SUBSHELL_SUPPORT
97 .subshell_pty = 0,
98 #endif /* !HAVE_SUBSHELL_SUPPORT */
100 .winch_flag = FALSE,
101 .command_line_colors = NULL,
102 .xterm_flag = FALSE,
103 .slow_terminal = FALSE,
104 .disable_colors = FALSE,
105 .ugly_line_drawing = FALSE,
106 .old_mouse = FALSE,
107 .alternate_plus_minus = FALSE,
110 .vfs =
112 .cd_symlinks = TRUE
116 /* *INDENT-ON* */
118 #undef SUBSHELL_USE
120 /*** file scope macro definitions ****************************************************************/
122 /*** file scope type declarations ****************************************************************/
124 /*** file scope variables ************************************************************************/
126 /*** file scope functions ************************************************************************/
128 /*** public functions ****************************************************************************/
129 /* --------------------------------------------------------------------------------------------- */