diff --git a/lib/vfs/mc-vfs/Makefile.am b/lib/vfs/mc-vfs/Makefile.am index 79fefed73..07de3069b 100644 --- a/lib/vfs/mc-vfs/Makefile.am +++ b/lib/vfs/mc-vfs/Makefile.am @@ -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: diff --git a/lib/vfs/mc-vfs/vfs-impl.h b/lib/vfs/mc-vfs/vfs-impl.h index 10babc523..1e9c268af 100644 --- a/lib/vfs/mc-vfs/vfs-impl.h +++ b/lib/vfs/mc-vfs/vfs-impl.h @@ -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 */ diff --git a/lib/vfs/mc-vfs/vfs.c b/lib/vfs/mc-vfs/vfs.c index 31df67be8..61511a475 100644 --- a/lib/vfs/mc-vfs/vfs.c +++ b/lib/vfs/mc-vfs/vfs.c @@ -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* */ }; diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 40bf7a1db..3e1f8edb7 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -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"]) ]) diff --git a/m4.include/vfs/mc-vfs-fish.m4 b/m4.include/vfs/mc-vfs-fish.m4 index d44a5b80e..7347fd31a 100644 --- a/m4.include/vfs/mc-vfs-fish.m4 +++ b/m4.include/vfs/mc-vfs-fish.m4 @@ -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 diff --git a/src/cmd.c b/src/cmd.c index 9e0c6196f..0895147c1 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -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 diff --git a/src/cmd.h b/src/cmd.h index 6243f78f3..6a8e09657 100644 --- a/src/cmd.h +++ b/src/cmd.h @@ -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); diff --git a/src/keybind.c b/src/keybind.c index 4236d65c6..14010a444 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -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 diff --git a/src/main.c b/src/main.c index 57bd47e06..b3b208d72 100644 --- a/src/main.c +++ b/src/main.c @@ -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; diff --git a/src/setup.c b/src/setup.c index f3a173001..c201b381b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -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 }, diff --git a/src/textconf.c b/src/textconf.c index a4cc33134..43b57dc40 100644 --- a/src/textconf.c +++ b/src/textconf.c @@ -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 */