Browse Source

Cleanup of main.[ch].

All file panels related stuff was moved to midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Andrew Borodin 14 years ago
parent
commit
fdb61594df

+ 0 - 2
lib/global.h

@@ -144,8 +144,6 @@
 
 /*** global variables defined in .c file *********************************************************/
 
-extern const char *home_dir;
-
 /*** declarations of public functions ************************************************************/
 
 void refresh_screen (void *);

+ 2 - 2
lib/logging.c

@@ -33,12 +33,12 @@
 #include <stdio.h>
 
 #include "lib/global.h"
-#include "logging.h"
 #include "lib/mcconfig.h"
 #include "lib/fileloc.h"
 
-#include "src/setup.h"
+#include "src/main.h"           /* home_dir */
 
+#include "logging.h"
 
 /*** global variables ****************************************************************************/
 

+ 1 - 3
lib/util.c

@@ -50,9 +50,7 @@
 
 #include "src/filegui.h"
 #include "src/file.h"           /* copy_file_file() */
-#ifndef HAVE_CHARSET
-#include "src/main.h"           /* eight_bit_clean */
-#endif
+#include "src/main.h"           /* home_dir, eight_bit_clean */
 
 /*** global variables ****************************************************************************/
 

+ 1 - 1
lib/vfs/mc-vfs/direntry.c

@@ -45,7 +45,7 @@
 #include "lib/widget.h"         /* message() */
 #endif
 
-#include "src/main.h"           /* print_vfs_message */
+#include "src/layout.h"           /* print_vfs_message */
 
 #include "vfs-impl.h"
 #include "utilvfs.h"

+ 2 - 2
lib/vfs/mc-vfs/fish.c

@@ -62,7 +62,8 @@
 #include "lib/unixcompat.h"
 #include "lib/fileloc.h"
 
-#include "src/main.h"           /* print_vfs_message */
+#include "src/layout.h"         /* print_vfs_message */
+#include "src/execute.h"        /* pre_exec, post_exec */
 
 #include "vfs-impl.h"
 #include "utilvfs.h"
@@ -72,7 +73,6 @@
 
 #include "fish.h"
 #include "fishdef.h"
-#include "src/execute.h"        /* pre_exec, post_exec */
 
 /*** global variables ****************************************************************************/
 

+ 1 - 1
lib/vfs/mc-vfs/ftpfs.c

@@ -92,7 +92,7 @@ What to do with this?
 #include "lib/tty/tty.h"        /* enable/disable interrupt key */
 #include "lib/widget.h"         /* message() */
 
-#include "src/main.h"           /* print_vfs_message */
+#include "src/layout.h"         /* print_vfs_message */
 #include "src/history.h"
 #include "src/setup.h"          /* for load_anon_passwd */
 

+ 2 - 2
lib/vfs/mc-vfs/gc.c

@@ -44,7 +44,7 @@
 
 #include "lib/global.h"
 
-#include "src/panel.h"          /* current_panel */
+#include "src/midnight.h"       /* current_panel */
 #include "src/layout.h"         /* get_current_type(), get_other_type() */
 
 #include "vfs-impl.h"
@@ -184,7 +184,7 @@ vfs_stamp_create (struct vfs_class *oldvfs, vfsid oldvfsid)
        current_dir and current_panel->cwd or current_dir and other_panel->cwd are the
        same, it's possible that all three are different -- Norbert */
 
-    if (!current_panel)
+    if (current_panel == NULL)
         return;
 
     nvfs = vfs_get_class (vfs_get_current_dir ());

+ 1 - 2
lib/vfs/mc-vfs/undelfs.c

@@ -59,8 +59,7 @@
 #include "lib/global.h"
 
 #include "lib/widget.h"         /* message() */
-#include "src/main.h"           /* print_vfs_message */
-
+#include "src/layout.h"         /* print_vfs_message */
 #include "utilvfs.h"
 #include "vfs-impl.h"
 

+ 1 - 1
lib/vfs/mc-vfs/vfs.c

@@ -58,7 +58,7 @@
 #ifdef HAVE_CHARSET
 #include "lib/charsets.h"
 #endif
-#include "src/main.h"           /* cd_symlinks */
+#include "src/setup.h"           /* cd_symlinks */
 
 #include "vfs-impl.h"
 #include "utilvfs.h"

+ 1 - 3
lib/widget/dialog-switch.c

@@ -32,10 +32,9 @@
 
 /* TODO: these includes should be removed! */
 #include "src/layout.h"             /* repaint_screen() */
-#include "src/main-widgets.h"       /* midnight_dlg */
+#include "src/midnight.h"           /* midnight_dlg */
 #include "src/main.h"               /* midnight_shutdown */
 
-
 /*** global variables ****************************************************************************/
 
 /*** file scope macro definitions ****************************************************************/
@@ -44,7 +43,6 @@
 
 /*** file scope variables ************************************************************************/
 
-
 /* List of dialogs: filemanagers, editors, viewers */
 static GList *mc_dialogs = NULL;
 /* Currently active dialog */

Some files were not shown because too many files changed in this diff