root/lib/global.c

/* [previous][next][first][last][top][bottom][index][help]  */
   1 /*
   2    Global structure for some library-related variables
   3 
   4    Copyright (C) 2009-2025
   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 <https://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 "mc-version.h"
  34 
  35 #include "global.h"
  36 
  37 #ifdef ENABLE_SUBSHELL
  38 #    ifdef SUBSHELL_OPTIONAL
  39 #        define SUBSHELL_USE FALSE
  40 #    else  // SUBSHELL_OPTIONAL
  41 #        define SUBSHELL_USE TRUE
  42 #    endif
  43 #else  // !ENABLE_SUBSHELL
  44 #    define SUBSHELL_USE FALSE
  45 #endif
  46 
  47 /*** global variables ****************************************************************************/
  48 
  49 mc_global_t mc_global =
  50 {
  51     .mc_version = MC_CURRENT_VERSION,
  52 
  53     .mc_run_mode = MC_RUN_FULL,
  54     .run_from_parent_mc = FALSE,
  55     .midnight_shutdown = FALSE,
  56 
  57     .sysconfig_dir = NULL,
  58     .share_data_dir = NULL,
  59 
  60     .profile_name = NULL,
  61 
  62 #ifdef HAVE_CHARSET
  63     .source_codepage = -1,
  64     .display_codepage = -1,
  65 #else
  66     .eight_bit_clean = TRUE,
  67     .full_eight_bits = FALSE,
  68 #endif
  69     .utf8_display = FALSE,
  70 
  71     .message_visible = TRUE,
  72     .keybar_visible = TRUE,
  73 
  74 #ifdef ENABLE_BACKGROUND
  75     .we_are_background = FALSE,
  76 #endif
  77 
  78     .widget =
  79     {
  80         .confirm_history_cleanup = TRUE,
  81         .show_all_if_ambiguous = FALSE,
  82         .is_right = FALSE
  83     },
  84 
  85     .shell = NULL,
  86 
  87     .tty =
  88     {
  89         .skin = NULL,
  90         .shadows = TRUE,
  91         .setup_color_string = NULL,
  92         .term_color_string = NULL,
  93         .color_terminal_string = NULL,
  94         .command_line_colors = NULL,
  95 #ifndef LINUX_CONS_SAVER_C
  96         .console_flag = '\0',
  97 #endif
  98 
  99         .use_subshell = SUBSHELL_USE,
 100 
 101 #ifdef ENABLE_SUBSHELL
 102         .subshell_pty = 0,
 103 #endif
 104 
 105         .xterm_flag = FALSE,
 106         .disable_x11 = FALSE,
 107         .slow_terminal = FALSE,
 108         .disable_colors = FALSE,
 109         .ugly_line_drawing = FALSE,
 110         .old_mouse = FALSE,
 111         .alternate_plus_minus = FALSE
 112     },
 113 
 114     .vfs =
 115     {
 116         .cd_symlinks = TRUE,
 117         .preallocate_space = FALSE,
 118     }
 119 
 120 };
 121 
 122 #undef SUBSHELL_USE
 123 
 124 /*** file scope macro definitions ****************************************************************/
 125 
 126 /*** file scope type declarations ****************************************************************/
 127 
 128 /*** file scope variables ************************************************************************/
 129 
 130 /*** file scope functions ************************************************************************/
 131 
 132 /*** public functions ****************************************************************************/
 133 /* --------------------------------------------------------------------------------------------- */

/* [previous][next][first][last][top][bottom][index][help]  */