Rework strutils for usage GString instread of self-made buffers.
[midnight-commander.git] / src / textconf.c
blob9539a772f974dc6faa226c4eb0b0c0d5e43c0bac
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 #include <config.h>
23 #include <limits.h>
24 #include <stdio.h>
26 #include <sys/types.h>
28 #include "global.h"
29 #include "ecs.h"
31 #ifdef USE_VFS
32 static const char *const vfs_supported[] = {
33 "tarfs",
34 "extfs",
35 "cpiofs",
36 #ifdef USE_NETCODE
37 "ftpfs",
38 "fish",
39 # ifdef WITH_MCFS
40 "mcfs",
41 # endif
42 # ifdef WITH_SMBFS
43 "smbfs",
44 # endif
45 #endif /* USE_NETCODE */
46 #ifdef USE_EXT2FSLIB
47 "undelfs",
48 #endif
49 NULL
51 #endif /* USE_VFS */
54 static const char *const features[] = {
55 #ifdef USE_INTERNAL_EDIT
56 N_("With builtin Editor\n"),
57 #endif
59 #ifdef HAVE_SLANG
61 N_("Using system-installed S-Lang library"),
63 " ",
65 N_("with terminfo database"),
67 #elif defined(USE_NCURSES)
68 N_("Using the ncurses library"),
69 #elif defined(USE_NCURSESW)
70 N_("Using the ncursesw library"),
71 #else
72 #error "Cannot compile mc without S-Lang or ncurses"
73 #endif /* !HAVE_SLANG && !USE_NCURSES */
75 "\n",
77 #ifdef HAVE_SUBSHELL_SUPPORT
78 # ifdef SUBSHELL_OPTIONAL
79 N_("With optional subshell support"),
80 # else
81 N_("With subshell support as default"),
82 # endif
83 "\n",
84 #endif /* !HAVE_SUBSHELL_SUPPORT */
86 #ifdef WITH_BACKGROUND
87 N_("With support for background operations\n"),
88 #endif
90 #ifdef HAVE_LIBGPM
91 N_("With mouse support on xterm and Linux console\n"),
92 #else
93 N_("With mouse support on xterm\n"),
94 #endif
96 #ifdef HAVE_TEXTMODE_X11_SUPPORT
97 N_("With support for X11 events\n"),
98 #endif
100 #ifdef ENABLE_NLS
101 N_("With internationalization support\n"),
102 #endif
104 #ifdef HAVE_CHARSET
105 N_("With multiple codepages support\n"),
106 #endif
108 NULL
111 void
112 show_version (int verbose)
114 int i;
116 printf (_("GNU Midnight Commander %s\n"), VERSION);
117 if (!verbose)
118 return;
120 #ifdef USE_VFS
121 printf (_("Virtual File System:"));
122 for (i = 0; vfs_supported[i]; i++) {
123 if (i == 0)
124 printf (" ");
125 else
126 printf (", ");
128 printf ("%s", _(vfs_supported[i]));
130 printf ("\n");
131 #endif /* USE_VFS */
133 for (i = 0; features[i]; i++)
134 printf ("%s", _(features[i]));
136 (void)printf("Data types:");
137 #define TYPE_INFO(T) \
138 (void)printf(" %s %d", #T, (int) (CHAR_BIT * sizeof(T)))
139 TYPE_INFO(char);
140 TYPE_INFO(int);
141 TYPE_INFO(long);
142 TYPE_INFO(void *);
143 TYPE_INFO(off_t);
144 TYPE_INFO(ecs_char);
145 #undef TYPE_INFO
146 (void)printf("\n");