added new parameter mcview_eof into ini-file
[free-mc.git] / src / textconf.c
blob671df28b3be99147ac9d79e93b959c523518a438
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"
34 #include "../src/textconf.h"
36 #ifdef ENABLE_VFS
37 static const char *const vfs_supported[] = {
38 "tarfs",
39 "extfs",
40 "cpiofs",
41 #ifdef USE_NETCODE
42 "ftpfs",
43 "fish",
44 # ifdef ENABLE_VFS_MCFS
45 "mcfs",
46 # endif
47 # ifdef ENABLE_VFS_SMB
48 "smbfs",
49 # endif /* ENABLE_VFS_SMB */
50 #endif /* USE_NETCODE */
51 #ifdef USE_EXT2FSLIB
52 "undelfs",
53 #endif
54 NULL
56 #endif /* ENABLE_VFS */
59 static const char *const features[] = {
60 #ifdef USE_INTERNAL_EDIT
61 N_("With builtin Editor\n"),
62 #endif
64 #ifdef HAVE_SLANG
66 N_("Using system-installed S-Lang library"),
68 " ",
70 N_("with terminfo database"),
72 #elif defined(USE_NCURSES)
73 N_("Using the ncurses library"),
74 #elif defined(USE_NCURSESW)
75 N_("Using the ncursesw library"),
76 #else
77 #error "Cannot compile mc without S-Lang or ncurses"
78 #endif /* !HAVE_SLANG && !USE_NCURSES */
80 "\n",
82 #ifdef HAVE_SUBSHELL_SUPPORT
83 # ifdef SUBSHELL_OPTIONAL
84 N_("With optional subshell support"),
85 # else
86 N_("With subshell support as default"),
87 # endif
88 "\n",
89 #endif /* !HAVE_SUBSHELL_SUPPORT */
91 #ifdef WITH_BACKGROUND
92 N_("With support for background operations\n"),
93 #endif
95 #ifdef HAVE_LIBGPM
96 N_("With mouse support on xterm and Linux console\n"),
97 #else
98 N_("With mouse support on xterm\n"),
99 #endif
101 #ifdef HAVE_TEXTMODE_X11_SUPPORT
102 N_("With support for X11 events\n"),
103 #endif
105 #ifdef ENABLE_NLS
106 N_("With internationalization support\n"),
107 #endif
109 #ifdef HAVE_CHARSET
110 N_("With multiple codepages support\n"),
111 #endif
113 NULL
116 void
117 show_version (void)
119 int i;
121 printf (_("GNU Midnight Commander %s\n"), VERSION);
123 #ifdef ENABLE_VFS
124 printf (_("Virtual File System:"));
125 for (i = 0; vfs_supported[i]; i++) {
126 if (i == 0)
127 printf (" ");
128 else
129 printf (", ");
131 printf ("%s", _(vfs_supported[i]));
133 printf ("\n");
134 #endif /* ENABLE_VFS */
136 for (i = 0; features[i]; i++)
137 printf ("%s", _(features[i]));
139 (void)printf("Data types:");
140 #define TYPE_INFO(T) \
141 (void)printf(" %s %d", #T, (int) (CHAR_BIT * sizeof(T)))
142 TYPE_INFO(char);
143 TYPE_INFO(int);
144 TYPE_INFO(long);
145 TYPE_INFO(void *);
146 TYPE_INFO(off_t);
147 TYPE_INFO(ecs_char);
148 #undef TYPE_INFO
149 (void)printf("\n");