Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.
[midnight-commander.git] / src / textconf.c
blob3313d3b4910a30e2cebca0e0f0087cfc28a3f5fe
1 /* Print features specific for this build
3 Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007
4 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 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, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 /** \file textconf.c
22 * \brief Source: prints features specific for this build
25 #include <config.h>
27 #include <limits.h>
28 #include <stdio.h>
29 #include <sys/types.h>
31 #include "lib/global.h"
32 #include "src/textconf.h"
34 /*** global variables ****************************************************************************/
36 /*** file scope macro definitions ****************************************************************/
38 /*** file scope type declarations ****************************************************************/
40 /*** file scope variables ************************************************************************/
42 #ifdef ENABLE_VFS
43 static const char *const vfs_supported[] = {
44 #ifdef ENABLE_VFS_CPIO
45 "cpiofs",
46 #endif
47 #ifdef ENABLE_VFS_TAR
48 "tarfs",
49 #endif
50 #ifdef ENABLE_VFS_SFS
51 "sfs",
52 #endif
53 #ifdef ENABLE_VFS_EXTFS
54 "extfs",
55 #endif
56 #ifdef ENABLE_VFS_UNDELFS
57 "ext2undelfs",
58 #endif
59 #ifdef ENABLE_VFS_FTP
60 "ftpfs",
61 #endif
62 #ifdef ENABLE_VFS_FISH
63 "fish",
64 #endif
65 #ifdef ENABLE_VFS_SMB
66 "smbfs",
67 #endif /* ENABLE_VFS_SMB */
68 NULL
70 #endif /* ENABLE_VFS */
72 static const char *const features[] = {
73 #ifdef HAVE_SLANG
74 N_("Using the S-Lang library with terminfo database\n"),
75 #elif defined(USE_NCURSES)
76 N_("Using the ncurses library\n"),
77 #elif defined(USE_NCURSESW)
78 N_("Using the ncursesw library\n"),
79 #else
80 #error "Cannot compile mc without S-Lang or ncurses"
81 #endif /* !HAVE_SLANG && !USE_NCURSES */
83 #ifdef USE_INTERNAL_EDIT
84 N_("With builtin Editor\n"),
85 #endif
87 #ifdef HAVE_SUBSHELL_SUPPORT
88 #ifdef SUBSHELL_OPTIONAL
89 N_("With optional subshell support\n"),
90 #else
91 N_("With subshell support as default\n"),
92 #endif
93 #endif /* !HAVE_SUBSHELL_SUPPORT */
95 #ifdef WITH_BACKGROUND
96 N_("With support for background operations\n"),
97 #endif
99 #ifdef HAVE_LIBGPM
100 N_("With mouse support on xterm and Linux console\n"),
101 #else
102 N_("With mouse support on xterm\n"),
103 #endif
105 #ifdef HAVE_TEXTMODE_X11_SUPPORT
106 N_("With support for X11 events\n"),
107 #endif
109 #ifdef ENABLE_NLS
110 N_("With internationalization support\n"),
111 #endif
113 #ifdef HAVE_CHARSET
114 N_("With multiple codepages support\n"),
115 #endif
117 NULL
120 /*** file scope functions ************************************************************************/
121 /* --------------------------------------------------------------------------------------------- */
123 /* --------------------------------------------------------------------------------------------- */
124 /*** public functions ****************************************************************************/
125 /* --------------------------------------------------------------------------------------------- */
127 void
128 show_version (void)
130 size_t i;
132 printf (_("GNU Midnight Commander %s\n"), VERSION);
134 printf (_("Built with GLib %d.%d.%d\n"),
135 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
137 for (i = 0; features[i] != NULL; i++)
138 printf ("%s", _(features[i]));
140 #ifdef ENABLE_VFS
141 printf (_("Virtual File Systems:"));
142 for (i = 0; vfs_supported[i] != NULL; i++)
143 printf ("%s %s", i == 0 ? "" : ",", _(vfs_supported[i]));
144 printf ("\n");
145 #endif /* ENABLE_VFS */
147 (void) printf (_("Data types:"));
148 #define TYPE_INFO(T) \
149 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
150 TYPE_INFO (char);
151 TYPE_INFO (int);
152 TYPE_INFO (long);
153 TYPE_INFO (void *);
154 TYPE_INFO (size_t);
155 TYPE_INFO (off_t);
156 #undef TYPE_INFO
157 (void) printf ("\n");
160 /* --------------------------------------------------------------------------------------------- */