global.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. Global structure for some library-related variables
  3. Copyright (C) 2009, 2011
  4. The 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 "global.h"
  25. /* *INDENT-OFF* */
  26. #ifdef ENABLE_SUBSHELL
  27. # ifdef SUBSHELL_OPTIONAL
  28. # define SUBSHELL_USE FALSE
  29. # else /* SUBSHELL_OPTIONAL */
  30. # define SUBSHELL_USE TRUE
  31. # endif /* SUBSHELL_OPTIONAL */
  32. #else /* !ENABLE_SUBSHELL */
  33. # define SUBSHELL_USE FALSE
  34. #endif /* !ENABLE_SUBSHELL */
  35. /* *INDENT-ON* */
  36. /*** global variables ****************************************************************************/
  37. /* *INDENT-OFF* */
  38. mc_global_t mc_global = {
  39. .mc_run_mode = MC_RUN_FULL,
  40. .midnight_shutdown = FALSE,
  41. .sysconfig_dir = NULL,
  42. .share_data_dir = NULL,
  43. #ifdef HAVE_CHARSET
  44. .source_codepage = -1,
  45. .display_codepage = -1,
  46. #else
  47. .eight_bit_clean = 1,
  48. .full_eight_bits = 0,
  49. #endif /* !HAVE_CHARSET */
  50. .utf8_display = FALSE,
  51. .message_visible = 1,
  52. .keybar_visible = 1,
  53. #ifdef ENABLE_BACKGROUND
  54. .we_are_background = FALSE,
  55. #endif /* ENABLE_BACKGROUND */
  56. .widget =
  57. {
  58. .confirm_history_cleanup = TRUE,
  59. .show_all_if_ambiguous = FALSE,
  60. .is_right = FALSE
  61. },
  62. .tty =
  63. {
  64. .skin = NULL,
  65. .setup_color_string = NULL,
  66. .term_color_string = NULL,
  67. .color_terminal_string = NULL,
  68. .command_line_colors = NULL,
  69. #ifndef LINUX_CONS_SAVER_C
  70. .console_flag = '\0',
  71. #endif /* !LINUX_CONS_SAVER_C */
  72. .use_subshell = SUBSHELL_USE,
  73. #ifdef ENABLE_SUBSHELL
  74. .subshell_pty = 0,
  75. #endif /* !ENABLE_SUBSHELL */
  76. .shell = NULL,
  77. .xterm_flag = FALSE,
  78. .disable_x11 = FALSE,
  79. .slow_terminal = FALSE,
  80. .disable_colors = FALSE,
  81. .ugly_line_drawing = FALSE,
  82. .old_mouse = FALSE,
  83. .alternate_plus_minus = FALSE,
  84. .winch_flag = 0
  85. },
  86. .vfs =
  87. {
  88. .cd_symlinks = TRUE,
  89. .preallocate_space = FALSE,
  90. }
  91. };
  92. /* *INDENT-ON* */
  93. #undef SUBSHELL_USE
  94. /*** file scope macro definitions ****************************************************************/
  95. /*** file scope type declarations ****************************************************************/
  96. /*** file scope variables ************************************************************************/
  97. /*** file scope functions ************************************************************************/
  98. /*** public functions ****************************************************************************/
  99. /* --------------------------------------------------------------------------------------------- */