Ticket #305 (dont work rename/copy on some chars)
[midnight-commander.git] / src / textconf.c
blob36c648436cb3894d8fa4fd5249619938cd2ddd41
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>
30 #include <sys/types.h>
32 #include "global.h"
33 #include "ecs.h"
35 #ifdef USE_VFS
36 static const char *const vfs_supported[] = {
37 "tarfs",
38 "extfs",
39 "cpiofs",
40 #ifdef USE_NETCODE
41 "ftpfs",
42 "fish",
43 # ifdef ENABLE_VFS_MCFS
44 "mcfs",
45 # endif
46 # ifdef WITH_SMBFS
47 "smbfs",
48 # endif
49 #endif /* USE_NETCODE */
50 #ifdef USE_EXT2FSLIB
51 "undelfs",
52 #endif
53 NULL
55 #endif /* USE_VFS */
58 static const char *const features[] = {
59 #ifdef USE_INTERNAL_EDIT
60 N_("With builtin Editor\n"),
61 #endif
63 #ifdef HAVE_SLANG
65 N_("Using system-installed S-Lang library"),
67 " ",
69 N_("with terminfo database"),
71 #elif defined(USE_NCURSES)
72 N_("Using the ncurses library"),
73 #elif defined(USE_NCURSESW)
74 N_("Using the ncursesw library"),
75 #else
76 #error "Cannot compile mc without S-Lang or ncurses"
77 #endif /* !HAVE_SLANG && !USE_NCURSES */
79 "\n",
81 #ifdef HAVE_SUBSHELL_SUPPORT
82 # ifdef SUBSHELL_OPTIONAL
83 N_("With optional subshell support"),
84 # else
85 N_("With subshell support as default"),
86 # endif
87 "\n",
88 #endif /* !HAVE_SUBSHELL_SUPPORT */
90 #ifdef WITH_BACKGROUND
91 N_("With support for background operations\n"),
92 #endif
94 #ifdef HAVE_LIBGPM
95 N_("With mouse support on xterm and Linux console\n"),
96 #else
97 N_("With mouse support on xterm\n"),
98 #endif
100 #ifdef HAVE_TEXTMODE_X11_SUPPORT
101 N_("With support for X11 events\n"),
102 #endif
104 #ifdef ENABLE_NLS
105 N_("With internationalization support\n"),
106 #endif
108 #ifdef HAVE_CHARSET
109 N_("With multiple codepages support\n"),
110 #endif
112 NULL
115 void
116 show_version (int verbose)
118 int i;
120 printf (_("GNU Midnight Commander %s\n"), VERSION);
121 if (!verbose)
122 return;
124 #ifdef USE_VFS
125 printf (_("Virtual File System:"));
126 for (i = 0; vfs_supported[i]; i++) {
127 if (i == 0)
128 printf (" ");
129 else
130 printf (", ");
132 printf ("%s", _(vfs_supported[i]));
134 printf ("\n");
135 #endif /* USE_VFS */
137 for (i = 0; features[i]; i++)
138 printf ("%s", _(features[i]));
140 (void)printf("Data types:");
141 #define TYPE_INFO(T) \
142 (void)printf(" %s %d", #T, (int) (CHAR_BIT * sizeof(T)))
143 TYPE_INFO(char);
144 TYPE_INFO(int);
145 TYPE_INFO(long);
146 TYPE_INFO(void *);
147 TYPE_INFO(off_t);
148 TYPE_INFO(ecs_char);
149 #undef TYPE_INFO
150 (void)printf("\n");