1 /* 2 Global structure for some library-related variables 3 4 Copyright (C) 2009-2020 5 Free Software Foundation, Inc. 6 7 Written by: 8 Slava Zanko <slavazanko@gmail.com>, 2009. 9 10 This file is part of the Midnight Commander. 11 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. 16 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. 21 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/>. 24 */ 25 26 /** \file glibcompat.c 27 * \brief Source: global structure for some library-related variables 28 * 29 */ 30 31 #include <config.h> 32 33 #include "global.h" 34 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* */ 46 47 /*** global variables ****************************************************************************/ 48 49 /* *INDENT-OFF* */ 50 mc_global_t mc_global = { 51 .mc_run_mode = MC_RUN_FULL, 52 .run_from_parent_mc = FALSE, 53 .midnight_shutdown = FALSE, 54 55 .sysconfig_dir = NULL, 56 .share_data_dir = NULL, 57 58 #ifdef HAVE_CHARSET 59 .source_codepage = -1, 60 .display_codepage = -1, 61 #else 62 .eight_bit_clean = TRUE, 63 .full_eight_bits = FALSE, 64 #endif /* !HAVE_CHARSET */ 65 .utf8_display = FALSE, 66 67 .message_visible = TRUE, 68 .keybar_visible = TRUE, 69 70 #ifdef ENABLE_BACKGROUND 71 .we_are_background = FALSE, 72 #endif /* ENABLE_BACKGROUND */ 73 74 .widget = 75 { 76 .confirm_history_cleanup = TRUE, 77 .show_all_if_ambiguous = FALSE, 78 .is_right = FALSE 79 }, 80 81 .shell = NULL, 82 83 .tty = 84 { 85 .skin = NULL, 86 .shadows = TRUE, 87 .setup_color_string = NULL, 88 .term_color_string = NULL, 89 .color_terminal_string = NULL, 90 .command_line_colors = NULL, 91 #ifndef LINUX_CONS_SAVER_C 92 .console_flag = '\0', 93 #endif /* !LINUX_CONS_SAVER_C */ 94 95 .use_subshell = SUBSHELL_USE, 96 97 #ifdef ENABLE_SUBSHELL 98 .subshell_pty = 0, 99 #endif /* !ENABLE_SUBSHELL */ 100 101 .xterm_flag = FALSE, 102 .disable_x11 = FALSE, 103 .slow_terminal = FALSE, 104 .disable_colors = FALSE, 105 .ugly_line_drawing = FALSE, 106 .old_mouse = FALSE, 107 .alternate_plus_minus = FALSE 108 }, 109 110 .vfs = 111 { 112 .cd_symlinks = TRUE, 113 .preallocate_space = FALSE, 114 } 115 116 }; 117 /* *INDENT-ON* */ 118 119 #undef SUBSHELL_USE 120 121 /*** file scope macro definitions ****************************************************************/ 122 123 /*** file scope type declarations ****************************************************************/ 124 125 /*** file scope variables ************************************************************************/ 126 127 /*** file scope functions ************************************************************************/ 128 129 /*** public functions ****************************************************************************/ 130 /* --------------------------------------------------------------------------------------------- */