diff --git a/src/ChangeLog b/src/ChangeLog index dfd8db422..348a3fd87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2001-05-28 Andrew V. Samoilov + + * main.c: Correct some comments after #endif + (shell): Remove comment and #ifdef around shell variable. + (process_args) [HAVE_SUBSHELL_SUPPORT]: All related args enclosed + between one #ifdef ... #endif pair. + (process_args): smbfs_set_debug () takes a debug level as argument, + commented out. + 2001-05-27 Pavel Roskin * main.c (OS_Setup) [!HAVE_X]: Exit immediately if TERM diff --git a/src/main.c b/src/main.c index cf33282ad..62df2c8ba 100644 --- a/src/main.c +++ b/src/main.c @@ -351,14 +351,8 @@ int boot_current_is_left = 1; /* Used for keeping track of the original stdout */ int stdout_fd = 0; -/* - * Ugh. Pavel, you shell hack in sfs is BAD. - * We need to kill shell from vfs - */ -#ifndef USE_VFS /* The user's shell */ char *shell; -#endif /* mc_home: The home of MC */ char *mc_home; @@ -1028,7 +1022,7 @@ _do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type) if (mc_chdir (directory) == -1){ strcpy (panel->cwd, olddir); g_free (olddir); - g_free (translated_url); + g_free (translated_url); return 0; } g_free (translated_url); @@ -2600,7 +2594,7 @@ process_args (int c, const char *option_arg) case 'l': ftpfs_set_debug (option_arg); #ifdef WITH_SMBFS - smbfs_set_debug (option_arg); +/* smbfs_set_debug (option_arg); */ #endif break; #endif @@ -2627,29 +2621,23 @@ process_args (int c, const char *option_arg) use_mouse_p = NO_MOUSE; break; - case 'X': #ifdef HAVE_SUBSHELL_SUPPORT + case 'X': debug_subshell = 1; -#endif break; case 'U': -#ifdef HAVE_SUBSHELL_SUPPORT use_subshell = 1; -#endif break; case 'u': -#ifdef HAVE_SUBSHELL_SUPPORT use_subshell = 0; -#endif break; case 'r': -#ifdef HAVE_SUBSHELL_SUPPORT force_subshell_execution = 1; -#endif break; +#endif /* HAVE_SUBSHELL_SUPPORT */ #ifndef HAVE_X case 'H': @@ -2872,7 +2860,7 @@ handle_args (int argc, char *argv []) finish_program = 1; } probably_finish_program (); -#endif /* HAVE_GNOME */ +#endif /* !HAVE_GNOME */ tmp = poptGetArg (ctx); @@ -2909,7 +2897,7 @@ handle_args (int argc, char *argv []) probably_finish_program (); } } else -#endif /* HAVE_GNOME */ +#endif /* !HAVE_GNOME */ { /* sets the current dir and the other dir */ if (tmp) { @@ -2986,7 +2974,7 @@ compatibility_move_mc_files (void) do_compatibility_move (mc_dir); g_free (mc_dir); } -#endif +#endif /* OS2_NT */ int main (int argc, char *argv []) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 54972bdcb..4d2aa899b 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2001-05-28 Andrew V. Samoilov + + * sfs.c (shell): Variable moved to ... + * util-alone.c (shell): ... here + 2001-05-27 Pavel Roskin * fish.c: Redirect stderr of all commands to /dev/null. diff --git a/vfs/sfs.c b/vfs/sfs.c index 22c181d5e..702b14dd8 100644 --- a/vfs/sfs.c +++ b/vfs/sfs.c @@ -27,9 +27,6 @@ #include "vfs.h" #include "local.h" -/* This is needed, or libvfs.so will lack symbol shell. Should look up who requires it */ -char *shell = "/bin/sh"; - struct cachedfile { char *name, *cache; uid_t uid; diff --git a/vfs/util-alone.c b/vfs/util-alone.c index 3c9e38832..3e2f35a9a 100644 --- a/vfs/util-alone.c +++ b/vfs/util-alone.c @@ -43,6 +43,7 @@ # include #endif +#include #include "../src/util.h" #include "vfs.h" #include "callback.h" @@ -54,6 +55,9 @@ int source_route = 0; int cd_symlinks = 0; +/* User's shell */ +char *shell = "/bin/sh"; + /* * We do not want/need many of midnight's functions, stub routines. */ @@ -155,29 +159,29 @@ exist_file (char *name) } void -message_1s (int i, char *c1, const char *c2) +message_1s (int i, char *header, const char *c2) { char buf [4096]; - snprintf (buf, sizeof (buf), "%s %s", c1, c2); + snprintf (buf, sizeof (buf), "%s %s", header, c2); box_puts (buf); } void -message_2s (int i, char *c1, char *c2, char *c3) +message_2s (int i, char *header, const char *c2, const char *c3) { char buf [4096]; - snprintf (buf, sizeof (buf), "%s %s %s", c1, c2, c3 ); + snprintf (buf, sizeof (buf), "%s %s %s", header, c2, c3 ); box_puts (buf ); } void -message_3s( int i, char *c1, char *c2, char *c3, const char *c4 ) +message_3s( int i, char *header, const char *c2, const char *c3, const char *c4) { char buf [4096]; - snprintf (buf, sizeof (buf), "%s %s %s %s", c1, c2, c3, c4); + snprintf (buf, sizeof (buf), "%s %s %s %s", header, c2, c3, c4); box_puts (buf); }