* POTFILES.in: src/features.inc renamed to src/features.c
* main.c [HAVE_X]: print_mc_usage() and print_color_usage() removed. version() moved to ... * features.inc: ... here, renamed to features.c * main.h: status_using_ncurses moved to ... * features.h: ... here * cmd.c, text.c: include "features.h" * cmd.h: include "panel.h" * Makefile.in: changed to use features.h and features.c
Этот коммит содержится в:
родитель
e828211662
Коммит
0cc57d07e0
@ -1,3 +1,7 @@
|
||||
2000-08-23 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* POTFILES.in: src/features.inc renamed to src/features.c
|
||||
|
||||
2000-08-19 Valek Filippov <frob@df.ru>
|
||||
|
||||
* ru.po: updated russian translation.
|
||||
|
@ -39,7 +39,7 @@ src/command.c
|
||||
src/dialog.c
|
||||
src/dir.c
|
||||
src/ext.c
|
||||
src/features.inc
|
||||
src/features.c
|
||||
src/file.c
|
||||
src/filegui.c
|
||||
src/find.c
|
||||
|
@ -1,3 +1,15 @@
|
||||
2000-08-23 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c [HAVE_X]: print_mc_usage() and print_color_usage()
|
||||
removed.
|
||||
version() moved to ...
|
||||
* features.inc: ... here, renamed to features.c
|
||||
* main.h: status_using_ncurses moved to ...
|
||||
* features.h: ... here
|
||||
* cmd.c, text.c: include "features.h"
|
||||
* cmd.h: include "panel.h"
|
||||
* Makefile.in: changed to use features.h and features.c
|
||||
|
||||
2000-08-22 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c [HAVE_GNOME]: disable chmod and chown - they were
|
||||
|
@ -25,7 +25,7 @@ SRCS = dir.c util.c main.c screen.c dialog.c key.c keyxdef.c menu.c \
|
||||
complete.c slint.c command.c cmd.c panelize.c learn.c \
|
||||
listmode.c utilunix.c background.c rxvt.c \
|
||||
text.c popt.c findme.c poptparse.c poptconfig.c popthelp.c \
|
||||
filegui.c filenot.c fileopctx.c treestore.c
|
||||
filegui.c filenot.c fileopctx.c treestore.c features.c
|
||||
|
||||
HDRS = color.h file.h mouse.h user.h dialog.h find.h main.h \
|
||||
util.h dir.h global.h menu.h panel.h win.h mem.h \
|
||||
@ -34,7 +34,7 @@ HDRS = color.h file.h mouse.h user.h dialog.h find.h main.h \
|
||||
subshell.h view.h setup.h key.h ext.h boxes.h \
|
||||
hotlist.h layout.h fsusage.h mountlist.h eregex.h complete.h \
|
||||
myslang.h command.h cmd.h tty.h fs.h panelize.h achown.h \
|
||||
learn.h listmode.h features.inc background.h \
|
||||
learn.h listmode.h features.h background.h \
|
||||
x.h textconf.h i18n.h findme.h popt.h filegui.h keys.h xtty.h \
|
||||
poptint.h poptalloca.h fileopctx.h treestore.h
|
||||
|
||||
@ -47,7 +47,7 @@ OBJS = dir.o util.o screen.o dialog.o key.o keyxdef.o menu.o \
|
||||
cmd.o main.o panelize.o learn.o listmode.o utilunix.o \
|
||||
background.o rxvt.o text.o popt.o findme.o poptparse.o \
|
||||
poptconfig.o popthelp.o filegui.o filenot.o fileopctx.o \
|
||||
treestore.o
|
||||
treestore.o features.o
|
||||
|
||||
#
|
||||
# Distribution variables
|
||||
|
@ -77,6 +77,7 @@
|
||||
#include "setup.h"
|
||||
#include "x.h"
|
||||
#include "profile.h"
|
||||
#include "features.h"
|
||||
|
||||
#define MIDNIGHT
|
||||
#include "../vfs/vfs.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#ifndef __CMD_H
|
||||
#define __CMD_H
|
||||
|
||||
#include "panel.h"
|
||||
|
||||
void netlink_cmd (void);
|
||||
void ftplink_cmd (void);
|
||||
void smblink_cmd (void);
|
||||
|
106
src/features.c
Обычный файл
106
src/features.c
Обычный файл
@ -0,0 +1,106 @@
|
||||
/* Print features specific for this build */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <glib.h>
|
||||
#include "i18n.h"
|
||||
#include "cmd.h"
|
||||
#include "features.h"
|
||||
|
||||
static const char * const features [] = {
|
||||
N_("Edition: "),
|
||||
N_("text mode"),
|
||||
#ifdef HAVE_TEXTMODE_X11_SUPPORT
|
||||
N_(" with X11 support to read modifiers"),
|
||||
#endif
|
||||
"\n",
|
||||
|
||||
#ifdef USE_VFS
|
||||
N_("Virtual File System: tarfs, extfs"),
|
||||
#ifdef USE_NETCODE
|
||||
N_(", ftpfs"),
|
||||
# ifdef HSC_PROXY
|
||||
N_(" (proxies: hsc proxy)"),
|
||||
# endif
|
||||
N_(", mcfs"),
|
||||
# ifdef USE_TERMNET
|
||||
N_(" (with termnet support)"),
|
||||
# endif
|
||||
# ifdef WITH_SMBFS
|
||||
N_(", smbfs"),
|
||||
# endif
|
||||
#endif
|
||||
#ifdef USE_EXT2FSLIB
|
||||
N_(", undelfs"),
|
||||
#endif
|
||||
"\n",
|
||||
#endif
|
||||
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
N_("With builtin Editor\n"),
|
||||
#endif
|
||||
|
||||
N_("Using "),
|
||||
#ifdef HAVE_SLANG
|
||||
# ifdef HAVE_SYSTEM_SLANG
|
||||
N_("system-installed "),
|
||||
# endif
|
||||
N_("S-lang library with "),
|
||||
|
||||
# ifdef SLANG_TERMINFO
|
||||
N_("terminfo"),
|
||||
# else
|
||||
# ifdef USE_TERMCAP
|
||||
N_("termcap"),
|
||||
# else
|
||||
N_("an unknown terminal"),
|
||||
# endif
|
||||
# endif
|
||||
N_(" database"),
|
||||
#else
|
||||
# ifdef USE_NCURSES
|
||||
N_("the ncurses library"),
|
||||
# else
|
||||
N_("some unknown curses library"),
|
||||
# endif
|
||||
#endif
|
||||
"\n",
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
N_("With subshell support: "),
|
||||
# ifdef SUBSHELL_OPTIONAL
|
||||
N_("optional"),
|
||||
# else
|
||||
N_("as default"),
|
||||
# endif
|
||||
"\n",
|
||||
#endif
|
||||
|
||||
#ifdef WITH_BACKGROUND
|
||||
N_("With support for background operations\n"),
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBGPM
|
||||
N_("with mouse support on xterm and the Linux console.\n"),
|
||||
#else
|
||||
N_("with mouse support on xterm.\n"),
|
||||
#endif
|
||||
NULL }
|
||||
;
|
||||
|
||||
void
|
||||
version (int verbose)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
fprintf (stderr, "The Midnight Commander %s\n", VERSION);
|
||||
if (!verbose)
|
||||
return;
|
||||
|
||||
for (i = 0; features [i]; i++)
|
||||
fprintf (stderr, _(features [i]));
|
||||
|
||||
str = guess_message_value (1);
|
||||
fprintf (stderr, "%s\n", str);
|
||||
g_free (str);
|
||||
}
|
7
src/features.h
Обычный файл
7
src/features.h
Обычный файл
@ -0,0 +1,7 @@
|
||||
#ifdef USE_NCURSES
|
||||
#define status_using_ncurses (1)
|
||||
#else
|
||||
#define status_using_ncurses (0)
|
||||
#endif
|
||||
|
||||
extern void version (int verbose);
|
34
src/main.c
34
src/main.c
@ -122,6 +122,7 @@
|
||||
#include "command.h"
|
||||
#include "wtools.h"
|
||||
#include "complete.h" /* For the free_completion */
|
||||
#include "features.h"
|
||||
|
||||
#include "chmod.h"
|
||||
#include "chown.h"
|
||||
@ -2278,33 +2279,6 @@ do_nc (void)
|
||||
done_mc_profile ();
|
||||
}
|
||||
|
||||
#include "features.inc"
|
||||
|
||||
static void
|
||||
version (int verbose)
|
||||
{
|
||||
char *str;
|
||||
|
||||
fprintf (stderr, "The Midnight Commander %s\n", VERSION);
|
||||
if (!verbose)
|
||||
return;
|
||||
|
||||
#ifndef HAVE_X
|
||||
fprintf (stderr, status_mouse_support ?
|
||||
_("with mouse support on xterm and the Linux console.\n") :
|
||||
_("with mouse support on xterm.\n"));
|
||||
#endif /* HAVE_X */
|
||||
for (verbose = 0; features [verbose]; verbose++)
|
||||
fprintf (stderr, _(features [verbose]));
|
||||
|
||||
str = guess_message_value (1);
|
||||
fprintf (stderr, "%s\n", str);
|
||||
g_free (str);
|
||||
|
||||
if (print_last_wd)
|
||||
write (stdout_fd, ".", 1);
|
||||
}
|
||||
|
||||
#if defined (_OS_NT)
|
||||
/* Windows NT code */
|
||||
#define CONTROL_FILE "\\mc.%d.control"
|
||||
@ -2493,6 +2467,7 @@ init_sigchld (void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_X
|
||||
static void
|
||||
print_mc_usage (void)
|
||||
{
|
||||
@ -2576,6 +2551,7 @@ print_color_usage (void)
|
||||
" yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
|
||||
" brightcyan, lightgray and white\n\n"));
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
static void
|
||||
probably_finish_program (void)
|
||||
@ -2596,6 +2572,7 @@ static void
|
||||
process_args (int c, const char *option_arg)
|
||||
{
|
||||
switch (c) {
|
||||
#ifndef HAVE_X
|
||||
case 'V':
|
||||
version (1);
|
||||
finish_program = 1;
|
||||
@ -2607,6 +2584,7 @@ process_args (int c, const char *option_arg)
|
||||
force_colors = 1;
|
||||
#endif
|
||||
break;
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
case 'f':
|
||||
fprintf (stderr, _("Library directory for the Midnight Commander: %s\n"), mc_home);
|
||||
@ -2668,13 +2646,13 @@ process_args (int c, const char *option_arg)
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifndef HAVE_X
|
||||
case 'H':
|
||||
print_color_usage ();
|
||||
finish_program = 1;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
#ifndef PORT_WANTS_ARGP
|
||||
print_mc_usage ();
|
||||
finish_program = 1;
|
||||
#endif
|
||||
|
@ -137,9 +137,6 @@ extern char *shell;
|
||||
/* directory specified on command line for startup */
|
||||
extern char *this_dir;
|
||||
|
||||
/* FIXME: remove this when using slang */
|
||||
extern const int status_using_ncurses;
|
||||
|
||||
void clr_scr (void);
|
||||
void restore_console (void);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "widget.h"
|
||||
#include "main.h"
|
||||
#include "cons.saver.h"
|
||||
#include "features.h"
|
||||
|
||||
char *default_edition_colors =
|
||||
"normal=lightgray,blue:"
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user