VFS: fishfs can now be switched off

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Enrico Weigelt, metux IT service 2010-07-13 17:01:25 +04:00 committed by Andrew Borodin
parent 05516fbac8
commit 67d6ebfd16
11 changed files with 39 additions and 27 deletions

View File

@ -5,10 +5,13 @@ endif
DIST_SUBDIRS = extfs fish
SUBDIRS = fish $(SAMBA_SUBDIRS)
SUBDIRS = $(SAMBA_SUBDIRS)
if ENABLE_VFS_EXTFS
SUBDIRS += extfs
endif
if ENABLE_VFS_FISH
SUBDIRS += fish
endif
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(SAMBA_CFLAGS)
@ -27,11 +30,10 @@ SFSFILES = sfs.c
EXTFSFILES = extfs.c
UNDELFILES = undelfs.c
NETFILES = \
netutil.c netutil.h \
fish.c fish.h fishdef.h
NETFILES = netutil.c netutil.h
FTPFILES = ftpfs.c ftpfs.h
FISHFILES = fish.c fish.h fishdef.h
SMBFILES = smbfs.c smbfs.h
libvfs_mc_la_SOURCES = $(BASICFILES)
@ -56,6 +58,9 @@ endif
if ENABLE_VFS_FTP
libvfs_mc_la_SOURCES += $(FTPFILES)
endif
if ENABLE_VFS_FISH
libvfs_mc_la_SOURCES += $(FISHFILES)
endif
if USE_SAMBA_FS
libvfs_mc_la_SOURCES += $(SMBFILES)
endif
@ -69,6 +74,7 @@ EXTRA_DIST = HACKING README \
$(UNDELFILES) \
$(NETFILES) \
$(FTPFILES) \
$(FISHFILES) \
$(SMBFILES)
dist-hook:

View File

@ -123,13 +123,15 @@ void init_sfs (void);
#ifdef ENABLE_VFS_EXTFS
void init_extfs (void);
#endif
void init_fish (void);
#ifdef ENABLE_VFS_UNDELFS
void init_undelfs (void);
#endif
#ifdef ENABLE_VFS_FTP
void init_ftpfs (void);
#endif
#ifdef ENABLE_VFS_FISH
void init_fish (void);
#endif
#endif /* ENABLE_VFS */

View File

@ -1354,12 +1354,12 @@ vfs_init (void)
#ifdef ENABLE_VFS_FTP
init_ftpfs ();
#endif /* ENABLE_VFS_FTP */
#ifdef USE_NETCODE
#ifdef ENABLE_VFS_FISH
init_fish ();
#endif /* ENABLE_VFS_FISH */
#ifdef ENABLE_VFS_SMB
init_smbfs ();
#endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
vfs_setup_wd ();
}
@ -1412,9 +1412,11 @@ static const struct
#ifdef ENABLE_VFS_FTP
{ "ftp://", 6, "/#ftp:" },
#endif
{ "smb://", 6, "/#smb:" },
#ifdef ENABLE_VFS_FISH
{ "sh://", 5, "/#sh:" },
{ "ssh://", 6, "/#sh:" },
#endif
{ "smb://", 6, "/#smb:" },
{ "a:", 2, "/#a" }
/* *INDENT-ON* */
};

View File

@ -66,14 +66,9 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
AC_MSG_NOTICE([Enabling VFS code])
AC_MC_VFS_FISH
AC_MC_VFS_SAMBA
MC_WITH_VFS
else
vfs_type="Plain OS filesystem"
AM_CONDITIONAL(ENABLE_VFS_FISH, [false])
fi
AC_MC_VFS_CPIOFS
@ -82,6 +77,7 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
AC_MC_VFS_EXTFS
AC_MC_VFS_UNDELFS
AC_MC_VFS_FTP
AC_MC_VFS_FISH
AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
])

View File

@ -2,9 +2,9 @@ dnl Enable FISH protocol (classic)
AC_DEFUN([AC_MC_VFS_FISH],
[
AC_ARG_ENABLE([vfs-fish],
[ --enable-vfs-fish Support for FISH vfs [[yes]]])
if test "x$enable_vfs_fish" != xno; then
enable_vfs_fish="yes"
AC_HELP_STRING([--enable-vfs-fish], [Support for FISH filesystem [[yes]]]))
if test "$enable_vfs" != "no" -a "x$enable_vfs_fish" != xno; then
enable_vfs_fish="yes"
AC_MC_VFS_ADDNAME([fish])
AC_DEFINE([ENABLE_VFS_FISH], [1], [Support for FISH vfs])
fi

View File

@ -1255,7 +1255,7 @@ nice_cd (const char *text, const char *xtext, const char *help,
#endif /* USE_NETCODE || ENABLE_VFS_UNDELFS */
#ifdef USE_NETCODE
#if defined (ENABLE_VFS_FTP) || defined (ENABLE_VFS_FISH) || defined (ENABLE_VFS_SMB)
static const char *machine_str = N_("Enter machine name (F1 for details):");
@ -1268,6 +1268,7 @@ ftplink_cmd (void)
}
#endif /* ENABLE_VFS_FTP */
#ifdef ENABLE_VFS_FISH
void
fishlink_cmd (void)
{
@ -1275,6 +1276,7 @@ fishlink_cmd (void)
"[FIle transfer over SHell filesystem]", ":fishlink_cmd: Shell link to machine ",
"/#sh:", 1);
}
#endif /* ENABLE_VFS_FISH */
#ifdef ENABLE_VFS_SMB
void
@ -1284,7 +1286,7 @@ smblink_cmd (void)
"[SMB File System]", ":smblink_cmd: SMB link to machine ", "/#smb:", 0);
}
#endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
#endif /* ENABLE_VFS_FTP || ENABLE_VFS_FISH || ENABLE_VFS_SMB */
#ifdef ENABLE_VFS_UNDELFS
void

View File

@ -20,7 +20,9 @@ typedef enum
#ifdef ENABLE_VFS_FTP
void ftplink_cmd (void);
#endif
#ifdef ENABLE_VFS_FISH
void fishlink_cmd (void);
#endif
void smblink_cmd (void);
void undelete_cmd (void);
void help_cmd (void);

View File

@ -349,7 +349,7 @@ static name_keymap_t command_names[] = {
{ "CmdFilter", CK_FilterCmd },
{ "CmdFilteredView", CK_FilteredViewCmd },
{ "CmdFind", CK_FindCmd },
#ifdef USE_NETCODE
#ifdef ENABLE_VFS_FISH
{ "CmdFishlink", CK_FishlinkCmd },
#endif
#ifdef ENABLE_VFS_FTP

View File

@ -677,7 +677,9 @@ create_panel_menu (void)
#ifdef ENABLE_VFS_FTP
entries = g_list_append (entries, menu_entry_create (_("FT&P link..."), CK_FtplinkCmd));
#endif
#ifdef ENABLE_VFS_FISH
entries = g_list_append (entries, menu_entry_create (_("S&hell link..."), CK_FishlinkCmd));
#endif
#ifdef ENABLE_VFS_SMB
entries = g_list_append (entries, menu_entry_create (_("SM&B link..."), CK_SmblinkCmd));
#endif /* ENABLE_VFS_SMB */
@ -1259,7 +1261,7 @@ midnight_execute_cmd (Widget * sender, unsigned long command)
case CK_FindCmd:
find_cmd ();
break;
#if defined (USE_NETCODE)
#ifdef ENABLE_VFS_FISH
case CK_FishlinkCmd:
fishlink_cmd ();
break;

View File

@ -41,7 +41,7 @@
#ifdef ENABLE_VFS_FTP
#include "lib/vfs/mc-vfs/ftpfs.h"
#endif
#ifdef USE_NETCODE
#ifdef ENABLE_VFS_FISH
#include "lib/vfs/mc-vfs/fish.h"
#endif
@ -224,9 +224,9 @@ static const struct
{ "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options },
{ "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls },
#endif /* ENABLE_VFS_FTP */
#ifdef USE_NETCODE
#ifdef ENABLE_VFS_FISH
{ "fish_directory_timeout", &fish_directory_timeout },
#endif
#endif /* ENABLE_VFS_FISH */
#endif /* ENABLE_VFS */
/* option_tab_spacing is used in internal viewer */
{ "editor_tab_spacing", &option_tab_spacing },

View File

@ -51,12 +51,12 @@ static const char *const vfs_supported[] = {
#ifdef ENABLE_VFS_FTP
"ftpfs",
#endif
#ifdef USE_NETCODE
#ifdef ENABLE_VFS_FISH
"fish",
# ifdef ENABLE_VFS_SMB
#endif
#ifdef ENABLE_VFS_SMB
"smbfs",
# endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
#endif /* ENABLE_VFS_SMB */
NULL
};
#endif /* ENABLE_VFS */