(mc_global_t::shell): new member to store user's shell
[midnight-commander.git] / lib / global.c
blob8a217fbde33d42516a14f722402cfba39531eb2f
1 /*
2 Global structure for some library-related variables
4 Copyright (C) 2009, 2011
5 The Free Software Foundation, Inc.
7 Written by:
8 Slava Zanko <slavazanko@gmail.com>, 2009.
10 This file is part of the Midnight Commander.
12 The Midnight Commander is free software: you can redistribute it
13 and/or modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation, either version 3 of the License,
15 or (at your option) any later version.
17 The Midnight Commander is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 /** \file glibcompat.c
27 * \brief Source: global structure for some library-related variables
31 #include <config.h>
33 #include "global.h"
35 /* *INDENT-OFF* */
36 #ifdef ENABLE_SUBSHELL
37 # ifdef SUBSHELL_OPTIONAL
38 # define SUBSHELL_USE FALSE
39 # else /* SUBSHELL_OPTIONAL */
40 # define SUBSHELL_USE TRUE
41 # endif /* SUBSHELL_OPTIONAL */
42 #else /* !ENABLE_SUBSHELL */
43 # define SUBSHELL_USE FALSE
44 #endif /* !ENABLE_SUBSHELL */
45 /* *INDENT-ON* */
47 /*** global variables ****************************************************************************/
49 /* *INDENT-OFF* */
50 mc_global_t mc_global = {
51 .mc_run_mode = MC_RUN_FULL,
52 .midnight_shutdown = FALSE,
54 .sysconfig_dir = NULL,
55 .share_data_dir = NULL,
57 #ifdef HAVE_CHARSET
58 .source_codepage = -1,
59 .display_codepage = -1,
60 #else
61 .eight_bit_clean = 1,
62 .full_eight_bits = 0,
63 #endif /* !HAVE_CHARSET */
64 .utf8_display = FALSE,
66 .message_visible = 1,
67 .keybar_visible = 1,
69 #ifdef ENABLE_BACKGROUND
70 .we_are_background = FALSE,
71 #endif /* ENABLE_BACKGROUND */
73 .widget =
75 .confirm_history_cleanup = TRUE,
76 .show_all_if_ambiguous = FALSE,
77 .is_right = FALSE
80 .tty =
82 .skin = NULL,
83 .setup_color_string = NULL,
84 .term_color_string = NULL,
85 .color_terminal_string = NULL,
86 .command_line_colors = NULL,
87 #ifndef LINUX_CONS_SAVER_C
88 .console_flag = '\0',
89 #endif /* !LINUX_CONS_SAVER_C */
91 .use_subshell = SUBSHELL_USE,
93 #ifdef ENABLE_SUBSHELL
94 .subshell_pty = 0,
95 #endif /* !ENABLE_SUBSHELL */
97 .shell = NULL,
99 .xterm_flag = FALSE,
100 .disable_x11 = FALSE,
101 .slow_terminal = FALSE,
102 .disable_colors = FALSE,
103 .ugly_line_drawing = FALSE,
104 .old_mouse = FALSE,
105 .alternate_plus_minus = FALSE,
106 .winch_flag = 0
109 .vfs =
111 .cd_symlinks = TRUE,
112 .preallocate_space = FALSE,
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 /* --------------------------------------------------------------------------------------------- */