global.c 3.5 KB

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