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

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