diff --git a/configure.ac b/configure.ac index a025bb334..a5a996337 100644 --- a/configure.ac +++ b/configure.ac @@ -301,7 +301,7 @@ have to use that instead of gettimeofday])]) AC_MC_VFS_CHECKS vfs_type="normal" -if test x$use_vfs = xyes; then +if test x$enable_vfs = xyes; then AC_MSG_NOTICE([enabling VFS code]) vfs_type="Midnight Commander Virtual File System" fi @@ -555,8 +555,7 @@ fi AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes]) AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang]) AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"]) -AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes]) -AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue]) +AM_CONDITIONAL(ENABLE_VFS_NET, [test x"$use_net_code" = xtrue]) AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"]) AM_CONDITIONAL(ENABLE_MCSERVER, [test x"$enable_mcserver" = "xyes"]) AM_CONDITIONAL(CHARSET, [test -n "$have_charset"]) diff --git a/doc/README.QNX b/doc/README.QNX index 6f39c73cd..b681ebca4 100644 --- a/doc/README.QNX +++ b/doc/README.QNX @@ -213,7 +213,7 @@ src/ file.c: - 'do_reget' can be extern if (USE_VFS && USE_NETCODE), not if (USE_VFS). + 'do_reget' can be extern if (ENABLE_VFS && USE_NETCODE), not if (ENABLE_VFS). find.c: diff --git a/edit/editcmd.c b/edit/editcmd.c index ced4748bc..b8c2cc619 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -474,11 +474,11 @@ edit_set_filename (WEdit *edit, const char *f) f = ""; edit->filename = g_strdup (f); if (edit->dir == NULL && *f != PATH_SEP) -#ifdef USE_VFS +#ifdef ENABLE_VFS edit->dir = g_strdup (vfs_get_current_dir ()); -#else +#else /* ENABLE_VFS */ edit->dir = g_get_current_dir (); -#endif +#endif /* ENABLE_VFS */ } static gboolean diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 3fcb73ad8..5db42cddf 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -25,7 +25,7 @@ dnl Check for various functions needed by libvfs. dnl This has various effects: dnl Sets MC_VFS_LIBS to libraries required dnl Sets vfs_flags to "pretty" list of vfs implementations we include. -dnl Sets shell variable use_vfs to yes (default, --with-vfs) or +dnl Sets shell variable enable_vfs to yes (default, --with-vfs) or dnl "no" (--without-vfs). dnl Private define @@ -56,7 +56,7 @@ AC_DEFUN([MC_WITH_VFS], fi - AC_DEFINE(USE_VFS, 1, [Define to enable VFS support]) + AC_DEFINE(ENABLE_VFS, 1, [Define to enable VFS support]) if $use_net_code; then AC_DEFINE(USE_NETCODE, 1, [Define to use networked VFS]) fi @@ -68,7 +68,6 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[ if test x"$enable_vfs" != x"no" ; then enable_vfs="yes" vfs_type="Midnight Commander Virtual Filesystem" - use_vfs=yes AC_MSG_NOTICE([Enabling VFS code]) diff --git a/src/Makefile.am b/src/Makefile.am index 28cdbd267..4cc9bcdc4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ if USE_EDIT EDITLIB = ../edit/libedit.a endif -if USE_VFS +if ENABLE_VFS if USE_SAMBA_FS VFSLIB = ../vfs/libvfs-mc.a ../vfs/samba/libsamba.a else diff --git a/src/boxes.c b/src/boxes.c index 0b95d3361..27202fd55 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -65,7 +65,7 @@ # include "../vfs/ftpfs.h" #endif -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../vfs/gc.h" #endif @@ -689,7 +689,7 @@ tree_box (const char *current_dir) return val; } -#ifdef USE_VFS +#ifdef ENABLE_VFS static char *ret_timeout; @@ -768,7 +768,7 @@ configure_vfs (void) #undef VFSY } -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ char * cd_dialog (void) diff --git a/src/cmd.c b/src/cmd.c index 220f781b8..ac14b143e 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -723,7 +723,7 @@ void quick_chdir_cmd (void) g_free (target); } -#ifdef USE_VFS +#ifdef ENABLE_VFS void reselect_vfs (void) { char *target; @@ -736,7 +736,7 @@ void reselect_vfs (void) message (D_ERROR, MSG_ERROR, _("Cannot change directory") ); g_free (target); } -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ static int compare_files (char *name1, char *name2, off_t size) { diff --git a/src/execute.c b/src/execute.c index b59109b01..52c3bfeb0 100644 --- a/src/execute.c +++ b/src/execute.c @@ -118,12 +118,12 @@ do_execute (const char *lc_shell, const char *command, int flags) char *new_dir = NULL; #endif /* HAVE_SUBSHELL_SUPPORT */ -#ifdef USE_VFS +#ifdef ENABLE_VFS char *old_vfs_dir = 0; if (!vfs_current_is_local ()) old_vfs_dir = g_strdup (vfs_get_current_dir ()); -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ save_cwds_stat (); pre_exec (); @@ -139,11 +139,11 @@ do_execute (const char *lc_shell, const char *command, int flags) do_update_prompt (); /* We don't care if it died, higher level takes care of this */ -#ifdef USE_VFS +#ifdef ENABLE_VFS invoke_subshell (command, VISIBLY, old_vfs_dir ? NULL : &new_dir); #else invoke_subshell (command, VISIBLY, &new_dir); -#endif /* !USE_VFS */ +#endif /* !ENABLE_VFS */ } else #endif /* HAVE_SUBSHELL_SUPPORT */ my_system (flags, lc_shell, command); @@ -181,12 +181,12 @@ do_execute (const char *lc_shell, const char *command, int flags) #endif /* HAVE_SUBSHELL_SUPPORT */ -#ifdef USE_VFS +#ifdef ENABLE_VFS if (old_vfs_dir) { mc_chdir (old_vfs_dir); g_free (old_vfs_dir); } -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ update_panels (UP_OPTIMIZE, UP_KEEPSEL); update_xterm_title_path (); diff --git a/src/file.c b/src/file.c index 8b7cd1132..c166320e3 100644 --- a/src/file.c +++ b/src/file.c @@ -192,16 +192,16 @@ is_in_linklist (struct link *lp, const char *path, struct stat *sb) { ino_t ino = sb->st_ino; dev_t dev = sb->st_dev; -#ifdef USE_VFS +#ifdef ENABLE_VFS struct vfs_class *vfs = vfs_get_class (path); -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ (void) path; while (lp) { -#ifdef USE_VFS +#ifdef ENABLE_VFS if (lp->vfs == vfs) -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ if (lp->ino == ino && lp->dev == dev) return 1; lp = lp->next; diff --git a/src/global.h b/src/global.h index be6fc06ab..b86851fd9 100644 --- a/src/global.h +++ b/src/global.h @@ -92,7 +92,7 @@ #include "textconf.h" -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../vfs/vfs.h" #else #include "vfsdummy.h" diff --git a/src/hotlist.c b/src/hotlist.c index 5dc5fd244..03eafbee5 100644 --- a/src/hotlist.c +++ b/src/hotlist.c @@ -78,7 +78,7 @@ #define B_APPEND (B_USER + 6) #define B_MOVE (B_USER + 7) -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../vfs/gc.h" #define B_FREE_ALL_VFS (B_USER + 8) #define B_REFRESH_VFS (B_USER + 9) @@ -145,7 +145,7 @@ static struct _hotlist_but { LIST_HOTLIST | LIST_MOVELIST, WPOS_KEEP_LEFT | WPOS_KEEP_BOTTOM }, { B_ADD_CURRENT, NORMAL_BUTTON, 0, 20, N_("&Add current"), LIST_HOTLIST, WPOS_KEEP_LEFT | WPOS_KEEP_BOTTOM }, -#ifdef USE_VFS +#ifdef ENABLE_VFS { B_REFRESH_VFS, NORMAL_BUTTON, 0, 43, N_("&Refresh"), LIST_VFSLIST, WPOS_KEEP_LEFT | WPOS_KEEP_BOTTOM }, { B_FREE_ALL_VFS, NORMAL_BUTTON, 0, 20, N_("Fr&ee VFSs now"), @@ -287,12 +287,12 @@ unlink_entry (struct hotlist *entry) entry->up = 0; } -#ifdef USE_VFS +#ifdef ENABLE_VFS static void add_name_to_list (const char *path) { listbox_add_item (l_hotlist, 0, 0, path, 0); } -#endif /* !USE_VFS */ +#endif /* !ENABLE_VFS */ static int hotlist_button_callback (int action) @@ -416,7 +416,7 @@ hotlist_button_callback (int action) break; } -#ifdef USE_VFS +#ifdef ENABLE_VFS case B_FREE_ALL_VFS: vfs_expire (1); /* fall through */ @@ -426,7 +426,7 @@ hotlist_button_callback (int action) listbox_add_item (l_hotlist, 0, 0, home_dir, 0); vfs_fill_names (add_name_to_list); return MSG_NOT_HANDLED; -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ default: return MSG_HANDLED; @@ -686,12 +686,12 @@ init_hotlist (int list_type) l_call); /* Fill the hotlist with the active VFS or the hotlist */ -#ifdef USE_VFS +#ifdef ENABLE_VFS if (list_type == LIST_VFSLIST) { listbox_add_item (l_hotlist, 0, 0, home_dir, 0); vfs_fill_names (add_name_to_list); } else -#endif /* !USE_VFS */ +#endif /* !ENABLE_VFS */ fill_listbox (); add_widget_autopos (hotlist_dlg, l_hotlist, WPOS_KEEP_ALL); diff --git a/src/keybind.c b/src/keybind.c index 66657ab16..5744e167f 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -838,9 +838,9 @@ const global_keymap_t default_main_map[] = { const global_keymap_t default_main_x_map[] = { { 'd', CK_CompareDirsCmd, "d" }, -#ifdef USE_VFS +#ifdef ENABLE_VFS { 'a', CK_ReselectVfs, "a"}, -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ { 'p', CK_CopyCurrentPathname, "p" }, { XCTRL ('p'), CK_CopyOtherPathname, "C-p" }, { 't', CK_CopyCurrentTagged, "t" }, diff --git a/src/main.c b/src/main.c index deb52b310..dd9dc2532 100644 --- a/src/main.c +++ b/src/main.c @@ -99,7 +99,7 @@ #include "charsets.h" #endif /* HAVE_CHARSET */ -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../vfs/gc.h" #endif @@ -752,7 +752,7 @@ create_command_menu (void) entries = g_list_append (entries, menu_separator_create ()); entries = g_list_append (entries, menu_entry_create (_("Command &history"), CK_HistoryCmd)); entries = g_list_append (entries, menu_entry_create (_("Di&rectory hotlist"), CK_QuickChdirCmd)); -#ifdef USE_VFS +#ifdef ENABLE_VFS entries = g_list_append (entries, menu_entry_create (_("&Active VFS list"), CK_ReselectVfs)); #endif #ifdef WITH_BACKGROUND @@ -785,7 +785,7 @@ create_options_menu (void) entries = g_list_append (entries, menu_entry_create (_("C&onfirmation..."), CK_ConfirmBox)); entries = g_list_append (entries, menu_entry_create (_("&Display bits..."), CK_DisplayBitsBox)); entries = g_list_append (entries, menu_entry_create (_("Learn &keys..."), CK_LearnKeys)); -#ifdef USE_VFS +#ifdef ENABLE_VFS entries = g_list_append (entries, menu_entry_create (_("&Virtual FS..."), CK_ConfigureVfs)); #endif entries = g_list_append (entries, menu_separator_create ()); @@ -1154,7 +1154,7 @@ midnight_execute_cmd (Widget *sender, unsigned long command) case CK_ConfigureBox: configure_box (); break; -#ifdef USE_VFS +#ifdef ENABLE_VFS case CK_ConfigureVfs: configure_vfs (); break; @@ -1301,7 +1301,7 @@ midnight_execute_cmd (Widget *sender, unsigned long command) case CK_RereadCmd: reread_cmd (); break; -#ifdef USE_VFS +#ifdef ENABLE_VFS case CK_ReselectVfs: reselect_vfs (); break; diff --git a/src/screen.c b/src/screen.c index 1bfed104b..b644240a1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2335,7 +2335,7 @@ do_enter_on_file_entry (file_entry *fe) _("&No")) != 0) return 1; } -#ifdef USE_VFS +#ifdef ENABLE_VFS if (!vfs_current_is_local ()) { char *tmp; int ret; diff --git a/src/setup.c b/src/setup.c index c9cdf7fff..01fea8931 100644 --- a/src/setup.c +++ b/src/setup.c @@ -53,7 +53,7 @@ #include "fileloc.h" #include "wtools.h" -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../vfs/gc.h" #endif @@ -188,7 +188,7 @@ static const struct { { "xtree_mode", &xtree_mode }, { "num_history_items_recorded", &num_history_items_recorded }, { "file_op_compute_totals", &file_op_compute_totals }, -#ifdef USE_VFS +#ifdef ENABLE_VFS { "vfs_timeout", &vfs_timeout }, #ifdef USE_NETCODE { "ftpfs_directory_timeout", &ftpfs_directory_timeout }, @@ -201,7 +201,7 @@ static const struct { { "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls }, { "fish_directory_timeout", &fish_directory_timeout }, #endif /* USE_NETCODE */ -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ #ifdef USE_INTERNAL_EDIT { "editor_word_wrap_line_length", &option_word_wrap_line_length }, { "editor_tab_spacing", &option_tab_spacing }, @@ -379,13 +379,13 @@ save_setup (void) save_panel_types (); /* directory_history_save (); */ -#if defined(USE_VFS) && defined (USE_NETCODE) +#if defined(ENABLE_VFS) && defined (USE_NETCODE) mc_config_set_string(mc_main_config, "Misc" , "ftpfs_password", ftpfs_anonymous_passwd); if (ftpfs_proxy_host) mc_config_set_string(mc_main_config, "Misc" , "ftp_proxy_host", ftpfs_proxy_host); -#endif /* USE_VFS && USE_NETCODE */ +#endif /* ENABLE_VFS && USE_NETCODE */ #ifdef HAVE_CHARSET mc_config_set_string(mc_main_config, "Misc" , "display_codepage", @@ -800,9 +800,9 @@ load_setup (void) /* Load the directory history */ /* directory_history_load (); */ /* Remove the temporal entries */ -#if defined(USE_VFS) && defined (USE_NETCODE) +#if defined(ENABLE_VFS) && defined (USE_NETCODE) ftpfs_init_passwd (); -#endif /* USE_VFS && USE_NETCODE */ +#endif /* ENABLE_VFS && USE_NETCODE */ #ifdef HAVE_CHARSET if ( load_codepages_list() > 0 ) { @@ -827,7 +827,7 @@ load_setup (void) #endif /* HAVE_CHARSET */ } -#if defined(USE_VFS) && defined (USE_NETCODE) +#if defined(ENABLE_VFS) && defined (USE_NETCODE) char * load_anon_passwd () { @@ -840,7 +840,7 @@ load_anon_passwd () g_free(buffer); return NULL; } -#endif /* USE_VFS && USE_NETCODE */ +#endif /* ENABLE_VFS && USE_NETCODE */ void done_setup (void) diff --git a/src/textconf.c b/src/textconf.c index 9bfc84c16..8696919a1 100644 --- a/src/textconf.c +++ b/src/textconf.c @@ -33,7 +33,7 @@ #include "ecs.h" #include "../src/textconf.h" -#ifdef USE_VFS +#ifdef ENABLE_VFS static const char *const vfs_supported[] = { "tarfs", "extfs", @@ -53,7 +53,7 @@ static const char *const vfs_supported[] = { #endif NULL }; -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ static const char *const features[] = { @@ -120,7 +120,7 @@ show_version (void) printf (_("GNU Midnight Commander %s\n"), VERSION); -#ifdef USE_VFS +#ifdef ENABLE_VFS printf (_("Virtual File System:")); for (i = 0; vfs_supported[i]; i++) { if (i == 0) @@ -131,7 +131,7 @@ show_version (void) printf ("%s", _(vfs_supported[i])); } printf ("\n"); -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ for (i = 0; features[i]; i++) printf ("%s", _(features[i])); diff --git a/src/tty/key.c b/src/tty/key.c index ab5bf234a..56b8719b9 100644 --- a/src/tty/key.c +++ b/src/tty/key.c @@ -50,9 +50,9 @@ #include "../../src/cons.saver.h" #include "../../src/strutil.h" /* str_casecmp */ -#ifdef USE_VFS +#ifdef ENABLE_VFS #include "../../vfs/gc.h" -#endif +#endif /* ENABLE_VFS */ #ifdef HAVE_TEXTMODE_X11_SUPPORT #include "../src/tty/x11conn.h" diff --git a/src/util.c b/src/util.c index ebbb0f472..08c577715 100644 --- a/src/util.c +++ b/src/util.c @@ -837,7 +837,7 @@ strip_ctrl_codes (char *s) } -#ifndef USE_VFS +#ifndef ENABLE_VFS char * get_current_wd (char *buffer, int size) { @@ -857,7 +857,7 @@ get_current_wd (char *buffer, int size) return buffer; } -#endif /* !USE_VFS */ +#endif /* !ENABLE_VFS */ enum compression_type get_compression_type (int fd, const char * name) diff --git a/vfs/Makefile.am b/vfs/Makefile.am index ffaf56223..dea50c57b 100644 --- a/vfs/Makefile.am +++ b/vfs/Makefile.am @@ -75,13 +75,13 @@ distclean-local: (cd samba && $(MAKE) distclean) \ else :; fi -if USE_VFS +if ENABLE_VFS noinst_LIBRARIES = libvfs-mc.a else noinst_LIBRARIES = endif -if USE_VFS_NET +if ENABLE_VFS_NET libvfs_mc_a_SOURCES = $(NETFILES) $(NONETFILES) else libvfs_mc_a_SOURCES = $(NONETFILES) diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am index a33f624ad..d955a2c07 100644 --- a/vfs/extfs/Makefile.am +++ b/vfs/extfs/Makefile.am @@ -64,7 +64,7 @@ EXTFS_OUT = \ uzip \ uzoo -if USE_VFS +if ENABLE_VFS extfs_DATA = $(EXTFS_MISC) extfs_SCRIPTS = $(EXTFS_CONST) $(EXTFS_OUT) diff --git a/vfs/vfs-impl.h b/vfs/vfs-impl.h index 00c752f78..e38b29349 100644 --- a/vfs/vfs-impl.h +++ b/vfs/vfs-impl.h @@ -7,7 +7,7 @@ #ifndef MC_VFS_IMPL_H #define MC_VFS_IMPL_H -#ifdef USE_VFS +#ifdef ENABLE_VFS #include #include @@ -150,6 +150,6 @@ void init_sfs (void); void init_tarfs (void); void init_undelfs (void); -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ #endif /* MC_VFS_IMPL_H */ diff --git a/vfs/vfs.h b/vfs/vfs.h index 7e0067afe..69b66a44f 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -12,7 +12,7 @@ #include #include -#ifdef USE_VFS +#ifdef ENABLE_VFS void vfs_init (void); void vfs_shut (void); @@ -32,7 +32,7 @@ const char *vfs_get_encoding (const char *path); /* return new string */ char *vfs_translate_path_n (const char *path); -#else /* USE_VFS */ +#else /* ENABLE_VFS */ #define vfs_init() do { } while (0) #define vfs_shut() do { } while (0) @@ -78,7 +78,7 @@ static inline char* vfs_canon_and_translate(const char* path) return strdup (buf); } -#endif /* USE_VFS */ +#endif /* ENABLE_VFS */ char *vfs_strip_suffix_from_filename (const char *filename); char *vfs_canon (const char *path);