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

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