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-2024
   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     .profile_name = NULL,
  64 
  65 #ifdef HAVE_CHARSET
  66     .source_codepage = -1,
  67     .display_codepage = -1,
  68 #else
  69     .eight_bit_clean = TRUE,
  70     .full_eight_bits = FALSE,
  71 #endif /* !HAVE_CHARSET */
  72     .utf8_display = FALSE,
  73 
  74     .message_visible = TRUE,
  75     .keybar_visible = TRUE,
  76 
  77 #ifdef ENABLE_BACKGROUND
  78     .we_are_background = FALSE,
  79 #endif /* ENABLE_BACKGROUND */
  80 
  81     .widget =
  82     {
  83         .confirm_history_cleanup = TRUE,
  84         .show_all_if_ambiguous = FALSE,
  85         .is_right = FALSE
  86     },
  87 
  88     .shell = NULL,
  89 
  90     .tty =
  91     {
  92         .skin = NULL,
  93         .shadows = TRUE,
  94         .setup_color_string = NULL,
  95         .term_color_string = NULL,
  96         .color_terminal_string = NULL,
  97         .command_line_colors = NULL,
  98 #ifndef LINUX_CONS_SAVER_C
  99         .console_flag = '\0',
 100 #endif /* !LINUX_CONS_SAVER_C */
 101 
 102         .use_subshell = SUBSHELL_USE,
 103 
 104 #ifdef ENABLE_SUBSHELL
 105         .subshell_pty = 0,
 106 #endif /* !ENABLE_SUBSHELL */
 107 
 108         .xterm_flag = FALSE,
 109         .disable_x11 = FALSE,
 110         .slow_terminal = FALSE,
 111         .disable_colors = FALSE,
 112         .ugly_line_drawing = FALSE,
 113         .old_mouse = FALSE,
 114         .alternate_plus_minus = FALSE
 115     },
 116 
 117     .vfs =
 118     {
 119         .cd_symlinks = TRUE,
 120         .preallocate_space = FALSE,
 121     }
 122 
 123 };
 124 /* *INDENT-ON* */
 125 
 126 #undef SUBSHELL_USE
 127 
 128 /*** file scope macro definitions ****************************************************************/
 129 
 130 /*** file scope type declarations ****************************************************************/
 131 
 132 /*** file scope variables ************************************************************************/
 133 
 134 /*** file scope functions ************************************************************************/
 135 
 136 /*** public functions ****************************************************************************/
 137 /* --------------------------------------------------------------------------------------------- */

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