Ticket #2569: fix bashisms in extfs
[midnight-commander.git] / lib / global.c
blobbeb5329caae5b1e2e391fcfac38c89d45ec8f49a
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 .args =
78 .disable_colors = FALSE,
79 .skin = NULL,
80 .ugly_line_drawing = FALSE,
81 .slow_terminal = FALSE
84 .widget =
86 .midnight_shutdown = FALSE,
87 .confirm_history_cleanup = TRUE,
88 .show_all_if_ambiguous = FALSE
91 .tty =
93 .setup_color_string = NULL,
94 .term_color_string = NULL,
95 .color_terminal_string = NULL,
96 #ifndef LINUX_CONS_SAVER_C
97 .console_flag = '\0',
98 #endif /* !LINUX_CONS_SAVER_C */
100 .use_subshell = SUBSHELL_USE,
102 #ifdef HAVE_SUBSHELL_SUPPORT
103 .subshell_pty = 0,
104 #endif /* !HAVE_SUBSHELL_SUPPORT */
106 .winch_flag = FALSE,
107 .command_line_colors = NULL,
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 /* --------------------------------------------------------------------------------------------- */