From a83624cc7534053126b81485af4269357f8ac5b5 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Tue, 8 Nov 2011 23:50:50 +0300 Subject: [PATCH] Code refactoring Signed-off-by: Slava Zanko --- lib/util.h | 4 ---- src/filemanager/Makefile.am | 2 +- src/filemanager/cmd.c | 1 + src/filemanager/file.c | 1 + src/filemanager/filenot.c | 2 ++ src/filemanager/filenot.h | 26 ++++++++++++++++++++++++++ 6 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/filemanager/filenot.h diff --git a/lib/util.h b/lib/util.h index 63302c732..3e8c71467 100644 --- a/lib/util.h +++ b/lib/util.h @@ -164,10 +164,6 @@ char *tilde_expand (const char *); void custom_canonicalize_pathname (char *, CANON_PATH_FLAGS); void canonicalize_pathname (char *); -/* Misc Unix functions */ -int my_mkdir (const vfs_path_t * s, mode_t mode); -int my_rmdir (const char *s); - #ifdef HAVE_REALPATH #define mc_realpath realpath #else diff --git a/src/filemanager/Makefile.am b/src/filemanager/Makefile.am index 99703d3dd..1e1652bdd 100644 --- a/src/filemanager/Makefile.am +++ b/src/filemanager/Makefile.am @@ -12,7 +12,7 @@ libmcfilemanager_la_SOURCES = \ ext.c ext.h \ file.c file.h \ filegui.c filegui.h \ - filenot.c \ + filenot.c filenot.h \ fileopctx.c fileopctx.h \ find.c find.h \ hotlist.c hotlist.h \ diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index 1af8571f1..ac2bcc16c 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -82,6 +82,7 @@ #include "fileopctx.h" #include "file.h" /* file operation routines */ #include "find.h" /* find_file() */ +#include "filenot.h" #include "hotlist.h" /* hotlist_show() */ #include "panel.h" /* WPanel */ #include "tree.h" /* tree_chdir() */ diff --git a/src/filemanager/file.c b/src/filemanager/file.c index 4d9f938df..0a3a03fca 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -81,6 +81,7 @@ /* Needed for current_panel, other_panel and WTree */ #include "dir.h" #include "filegui.h" +#include "filenot.h" #include "tree.h" #include "midnight.h" /* current_panel */ diff --git a/src/filemanager/filenot.c b/src/filemanager/filenot.c index c2e03faf0..a04fa61f1 100644 --- a/src/filemanager/filenot.c +++ b/src/filemanager/filenot.c @@ -43,6 +43,8 @@ #include "lib/util.h" #include "lib/vfs/vfs.h" +#include "filenot.h" + /*** global variables ****************************************************************************/ /*** file scope macro definitions ****************************************************************/ diff --git a/src/filemanager/filenot.h b/src/filemanager/filenot.h new file mode 100644 index 000000000..a49d04630 --- /dev/null +++ b/src/filemanager/filenot.h @@ -0,0 +1,26 @@ +/** \file file.h + * \brief Header: File and directory operation routines + */ + +#ifndef MC__FILENOT_H +#define MC__FILENOT_H + +#include "lib/global.h" + +/*** typedefs(not structures) and defined constants **********************************************/ + +/*** enums ***************************************************************************************/ + +/*** structures declarations (and typedefs of structures)*****************************************/ + +/*** global variables defined in .c file *********************************************************/ + +/*** declarations of public functions ************************************************************/ + +/* Misc Unix functions */ +int my_mkdir (const vfs_path_t * s, mode_t mode); +int my_rmdir (const char *s); + +/*** inline functions ****************************************************************************/ + +#endif /* MC__FILE_H */ -- 2.11.4.GIT