global.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. Global structure for some library-related variables
  3. Copyright (C) 2009-2024
  4. Free Software Foundation, Inc.
  5. Written by:
  6. Slava Zanko <slavazanko@gmail.com>, 2009.
  7. This file is part of the Midnight Commander.
  8. The Midnight Commander is free software: you can redistribute it
  9. and/or modify it under the terms of the GNU General Public License as
  10. published by the Free Software Foundation, either version 3 of the License,
  11. or (at your option) any later version.
  12. The Midnight Commander is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. /** \file glibcompat.c
  20. * \brief Source: global structure for some library-related variables
  21. *
  22. */
  23. #include <config.h>
  24. #include "mc-version.h"
  25. #include "global.h"
  26. /* *INDENT-OFF* */
  27. #ifdef ENABLE_SUBSHELL
  28. #ifdef SUBSHELL_OPTIONAL
  29. #define SUBSHELL_USE FALSE
  30. #else /* SUBSHELL_OPTIONAL */
  31. #define SUBSHELL_USE TRUE
  32. #endif /* SUBSHELL_OPTIONAL */
  33. #else /* !ENABLE_SUBSHELL */
  34. #define SUBSHELL_USE FALSE
  35. #endif /* !ENABLE_SUBSHELL */
  36. /* *INDENT-ON* */
  37. /*** global variables ****************************************************************************/
  38. /* *INDENT-OFF* */
  39. mc_global_t mc_global =
  40. {
  41. .mc_version = MC_CURRENT_VERSION,
  42. .mc_run_mode = MC_RUN_FULL,
  43. .run_from_parent_mc = FALSE,
  44. .midnight_shutdown = FALSE,
  45. .sysconfig_dir = NULL,
  46. .share_data_dir = NULL,
  47. .profile_name = NULL,
  48. #ifdef HAVE_CHARSET
  49. .source_codepage = -1,
  50. .display_codepage = -1,
  51. #else
  52. .eight_bit_clean = TRUE,
  53. .full_eight_bits = FALSE,
  54. #endif /* !HAVE_CHARSET */
  55. .utf8_display = FALSE,
  56. .message_visible = TRUE,
  57. .keybar_visible = TRUE,
  58. #ifdef ENABLE_BACKGROUND
  59. .we_are_background = FALSE,
  60. #endif /* ENABLE_BACKGROUND */
  61. .widget =
  62. {
  63. .confirm_history_cleanup = TRUE,
  64. .show_all_if_ambiguous = FALSE,
  65. .is_right = FALSE
  66. },
  67. .shell = NULL,
  68. .tty =
  69. {
  70. .skin = NULL,
  71. .shadows = TRUE,
  72. .setup_color_string = NULL,
  73. .term_color_string = NULL,
  74. .color_terminal_string = NULL,
  75. .command_line_colors = NULL,
  76. #ifndef LINUX_CONS_SAVER_C
  77. .console_flag = '\0',
  78. #endif /* !LINUX_CONS_SAVER_C */
  79. .use_subshell = SUBSHELL_USE,
  80. #ifdef ENABLE_SUBSHELL
  81. .subshell_pty = 0,
  82. #endif /* !ENABLE_SUBSHELL */
  83. .xterm_flag = FALSE,
  84. .disable_x11 = FALSE,
  85. .slow_terminal = FALSE,
  86. .disable_colors = FALSE,
  87. .ugly_line_drawing = FALSE,
  88. .old_mouse = FALSE,
  89. .alternate_plus_minus = FALSE
  90. },
  91. .vfs =
  92. {
  93. .cd_symlinks = TRUE,
  94. .preallocate_space = FALSE,
  95. }
  96. };
  97. /* *INDENT-ON* */
  98. #undef SUBSHELL_USE
  99. /*** file scope macro definitions ****************************************************************/
  100. /*** file scope type declarations ****************************************************************/
  101. /*** file scope variables ************************************************************************/
  102. /*** file scope functions ************************************************************************/
  103. /*** public functions ****************************************************************************/
  104. /* --------------------------------------------------------------------------------------------- */