2 * \brief Header: %global definitions for compatibility
4 * This file should be included after all system includes and before all local includes.
11 #include "glibcompat.h"
13 #include "unixcompat.h"
19 /*** typedefs(not structures) and defined constants **********************************************/
23 #define _(String) gettext (String)
25 #define N_(String) gettext_noop (String)
27 #define N_(String) (String)
29 #else /* Stubs that do something close enough. */
30 #define textdomain(String) 1
31 #define gettext(String) (String)
32 #define ngettext(String1,String2,Num) (((Num) == 1) ? (String1) : (String2))
33 #define dgettext(Domain,Message) (Message)
34 #define dcgettext(Domain,Message,Type) (Message)
35 #define bindtextdomain(Domain,Directory) 1
36 #define _(String) (String)
37 #define N_(String) (String)
38 #endif /* !ENABLE_NLS */
40 #ifdef HAVE_FUNC_ATTRIBUTE_FALLTHROUGH
41 #define MC_FALLTHROUGH __attribute__((fallthrough))
43 #define MC_FALLTHROUGH
46 #ifdef USE_MAINTAINER_MODE
47 #include "lib/logging.h"
50 /* Just for keeping Your's brains from invention a proper size of the buffer :-) */
51 #define BUF_10K 10240L
56 #define BUF_LARGE BUF_1K
57 #define BUF_MEDIUM 512
61 #define UTF8_CHAR_LEN 6
63 /* Used to distinguish between a normal MC termination and */
64 /* one caused by typing 'exit' or 'logout' in the subshell */
65 #define SUBSHELL_EXIT 128
67 #define MC_ERROR g_quark_from_static_string (PACKAGE)
69 #define DEFAULT_CHARSET "ASCII"
71 /*** enums ***************************************************************************************/
73 /* run mode and params */
82 /*** structures declarations (and typedefs of structures)*****************************************/
86 const char *mc_version
;
88 mc_run_mode_t mc_run_mode
;
89 gboolean run_from_parent_mc
;
90 /* Used so that widgets know if they are being destroyed or shut down */
91 gboolean midnight_shutdown
;
93 /* sysconfig_dir: Area for default settings from maintainers of distributuves
94 default is /etc/mc or may be defined by MC_DATADIR */
96 /* share_data_dir: Area for default settings from developers */
101 mc_config_t
*main_config
;
102 mc_config_t
*panels_config
;
105 /* Numbers of (file I/O) and (input/display) codepages. -1 if not selected */
107 int display_codepage
;
109 /* If true, allow characters in the range 160-255 */
110 gboolean eight_bit_clean
;
112 * If true, also allow characters in the range 128-159.
113 * This is reported to break on many terminals (xterm, qansi-m).
115 gboolean full_eight_bits
;
116 #endif /* !HAVE_CHARSET */
118 * If utf-8 terminal utf8_display = TRUE
119 * Display bits set UTF-8
121 gboolean utf8_display
;
123 /* Set if the nice message (hint) bar is visible */
124 gboolean message_visible
;
125 /* Set if the nice and useful keybar is visible */
126 gboolean keybar_visible
;
128 #ifdef ENABLE_BACKGROUND
129 /* If true, this is a background process */
130 gboolean we_are_background
;
131 #endif /* ENABLE_BACKGROUND */
135 /* Asks for confirmation before clean up of history */
136 gboolean confirm_history_cleanup
;
138 /* Set if you want the possible completions dialog for the first time */
139 gboolean show_all_if_ambiguous
;
141 /* Ugly hack in order to distinguish between left and right panel in menubar */
142 /* Set if the command is being run from the "Right" menu */
143 gboolean is_right
; /* If the selected menu was the right */
146 /* The user's shell */
151 /* Use the specified skin */
153 /* Dialog window and drop down menu have a shadow */
156 char *setup_color_string
;
157 char *term_color_string
;
158 char *color_terminal_string
;
159 /* colors specified on the command line: they override any other setting */
160 char *command_line_colors
;
162 #ifndef LINUX_CONS_SAVER_C
163 /* Used only in mc, not in cons.saver */
165 #endif /* !LINUX_CONS_SAVER_C */
166 /* If using a subshell for evaluating commands this is true */
167 gboolean use_subshell
;
169 #ifdef ENABLE_SUBSHELL
170 /* File descriptors of the pseudoterminal used by the subshell */
172 #endif /* !ENABLE_SUBSHELL */
174 /* This flag is set by xterm detection routine in function main() */
175 /* It is used by function toggle_subshell() */
178 /* disable x11 support */
179 gboolean disable_x11
;
181 /* For slow terminals */
182 /* If true lines are shown by spaces */
183 gboolean slow_terminal
;
185 /* Set to force black and white display at program startup */
186 gboolean disable_colors
;
188 /* If true use +, -, | for line drawing */
189 gboolean ugly_line_drawing
;
191 /* Tries to use old highlight mouse tracking */
194 /* If true, use + and \ keys normally and select/unselect do if M-+ / M-\.
195 and M-- and keypad + / - */
196 gboolean alternate_plus_minus
;
201 /* Set when cd symlink following is desirable (bash mode) */
202 gboolean cd_symlinks
;
204 /* Preallocate space before file copying */
205 gboolean preallocate_space
;
210 /*** global variables defined in .c file *********************************************************/
212 extern mc_global_t mc_global
;
214 /*** declarations of public functions ************************************************************/
216 /*** inline functions ****************************************************************************/