global.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 HAVE_SUBSHELL_SUPPORT
  27. # ifdef SUBSHELL_OPTIONAL
  28. # define SUBSHELL_USE FALSE
  29. # else /* SUBSHELL_OPTIONAL */
  30. # define SUBSHELL_USE TRUE
  31. # endif /* SUBSHELL_OPTIONAL */
  32. #else /* !HAVE_SUBSHELL_SUPPORT */
  33. # define SUBSHELL_USE FALSE
  34. #endif /* !HAVE_SUBSHELL_SUPPORT */
  35. /* *INDENT-ON* */
  36. /*** global variables ****************************************************************************/
  37. #ifdef SIGACT
  38. struct sigaction clock_new, clock_old, clock_dummy;
  39. #else
  40. void (*clock_alarm) (int);
  41. #endif
  42. unsigned int clock_remain;
  43. int op_clock_type = HOUR_MIN_SEC;
  44. int clock_ticks;
  45. int clock_type;
  46. /* *INDENT-OFF* */
  47. mc_global_t mc_global = {
  48. .mc_run_mode = MC_RUN_FULL,
  49. .midnight_shutdown = FALSE,
  50. .sysconfig_dir = NULL,
  51. .share_data_dir = NULL,
  52. #ifdef HAVE_CHARSET
  53. .source_codepage = -1,
  54. .display_codepage = -1,
  55. #else
  56. .eight_bit_clean = 1,
  57. .full_eight_bits = 0,
  58. #endif /* !HAVE_CHARSET */
  59. .utf8_display = FALSE,
  60. .message_visible = 1,
  61. .keybar_visible = 1,
  62. #ifdef ENABLE_BACKGROUND
  63. .we_are_background = FALSE,
  64. #endif /* ENABLE_BACKGROUND */
  65. .widget =
  66. {
  67. .confirm_history_cleanup = TRUE,
  68. .show_all_if_ambiguous = FALSE,
  69. .is_right = FALSE
  70. },
  71. .tty =
  72. {
  73. .skin = NULL,
  74. .setup_color_string = NULL,
  75. .term_color_string = NULL,
  76. .color_terminal_string = NULL,
  77. .command_line_colors = NULL,
  78. #ifndef LINUX_CONS_SAVER_C
  79. .console_flag = '\0',
  80. #endif /* !LINUX_CONS_SAVER_C */
  81. .use_subshell = SUBSHELL_USE,
  82. #ifdef HAVE_SUBSHELL_SUPPORT
  83. .subshell_pty = 0,
  84. #endif /* !HAVE_SUBSHELL_SUPPORT */
  85. .xterm_flag = FALSE,
  86. .disable_x11 = FALSE,
  87. .slow_terminal = FALSE,
  88. .disable_colors = FALSE,
  89. .ugly_line_drawing = FALSE,
  90. .old_mouse = FALSE,
  91. .alternate_plus_minus = FALSE,
  92. .winch_flag = FALSE
  93. },
  94. .vfs =
  95. {
  96. .cd_symlinks = TRUE,
  97. .preallocate_space = FALSE,
  98. }
  99. };
  100. /* *INDENT-ON* */
  101. #undef SUBSHELL_USE
  102. /*** file scope macro definitions ****************************************************************/
  103. /*** file scope type declarations ****************************************************************/
  104. /*** file scope variables ************************************************************************/
  105. /*** file scope functions ************************************************************************/
  106. /*** public functions ****************************************************************************/
  107. /* --------------------------------------------------------------------------------------------- */