1 /*
2 Global structure for some library-related variables
3
4 Copyright (C) 2009-2026
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
41 #define SUBSHELL_USE TRUE
42 #endif
43 #else
44 #define SUBSHELL_USE FALSE
45 #endif
46
47 /*** global variables ****************************************************************************/
48
49 mc_global_t mc_global = {
50 .mc_version = MC_CURRENT_VERSION,
51
52 .mc_run_mode = MC_RUN_FULL,
53 .run_from_parent_mc = FALSE,
54 .midnight_shutdown = FALSE,
55
56 .sysconfig_dir = NULL,
57 .share_data_dir = NULL,
58
59 .profile_name = NULL,
60
61 .source_codepage = -1,
62 .display_codepage = -1,
63 .utf8_display = FALSE,
64
65 .menubar_visible = TRUE,
66 .hint_visible = TRUE,
67 .cmdline_visible = TRUE,
68 .keybar_visible = TRUE,
69
70 #ifdef ENABLE_BACKGROUND
71 .we_are_background = FALSE,
72 #endif
73
74 .widget = {
75 .confirm_history_cleanup = TRUE,
76 .show_all_if_ambiguous = FALSE,
77 .is_right = FALSE,
78 },
79
80 .shell = NULL,
81
82 .tty = {
83 .skin = NULL,
84 .shadows = TRUE,
85 .setup_color_string = NULL,
86 .term_color_string = NULL,
87 .color_terminal_string = NULL,
88
89 #ifndef LINUX_CONS_SAVER_C
90 .console_flag = '\0',
91 #endif
92
93 .use_subshell = SUBSHELL_USE,
94 #ifdef ENABLE_SUBSHELL
95 .subshell_pty = 0,
96 #endif
97
98 .xterm_flag = FALSE,
99 .disable_x11 = FALSE,
100 .slow_terminal = FALSE,
101 .disable_colors = FALSE,
102 .ugly_line_drawing = FALSE,
103 .old_mouse = FALSE,
104 .alternate_plus_minus = FALSE,
105 },
106
107 .vfs = {
108 .cd_symlinks = TRUE,
109 .preallocate_space = FALSE,
110 .file_cloning = TRUE,
111 },
112
113 };
114
115 #undef SUBSHELL_USE
116
117 /*** file scope macro definitions ****************************************************************/
118
119 /*** file scope type declarations ****************************************************************/
120
121 /*** file scope variables ************************************************************************/
122
123 /* --------------------------------------------------------------------------------------------- */
124 /*** file scope functions ************************************************************************/
125 /* --------------------------------------------------------------------------------------------- */
126
127 /* --------------------------------------------------------------------------------------------- */
128 /*** public functions ****************************************************************************/
129 /* --------------------------------------------------------------------------------------------- */
130
131 char *
132 mc_get_package_copyright (void)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
133 {
134 const size_t last_year = 2026;
135
136 return g_strdup_printf (_ ("Copyright (C) 1996-%zu the Free Software Foundation"), last_year);
137 }
138
139 /* --------------------------------------------------------------------------------------------- */