From cd4dbf3a09c8672f2b37593950c98fb79e08b16e Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Thu, 21 Jan 2010 14:17:26 +0200 Subject: [PATCH] Changes for build after moving strutil into lib Signed-off-by: Slava Zanko --- configure.ac | 1 + lib/Makefile.am | 3 ++- lib/mcconfig/get.c | 2 +- lib/mcconfig/set.c | 2 +- lib/search/glob.c | 8 +++++--- lib/search/hex.c | 8 +++++--- lib/search/lib.c | 3 ++- lib/search/normal.c | 6 ++++-- lib/search/regex.c | 8 +++++--- lib/search/search.c | 6 ++++-- lib/strutil/Makefile.am | 9 +++++++++ lib/strutil/strutil.c | 2 +- lib/strutil/strutil8bit.c | 2 +- lib/strutil/strutilascii.c | 2 +- lib/strutil/strutilutf8.c | 2 +- lib/tty/key.c | 13 +++++++------ lib/tty/tty-ncurses.c | 6 +++--- lib/tty/tty-slang.c | 2 +- lib/tty/tty.c | 2 +- lib/util.c | 2 +- lib/vfs/mc-vfs/vfs.c | 2 +- src/Makefile.am | 6 +----- src/achown.c | 2 +- src/args.c | 3 ++- src/boxes.c | 19 +++++++++---------- src/charsets.c | 7 ++++--- src/chmod.c | 2 +- src/chown.c | 2 +- src/cmd.c | 2 +- src/complete.c | 2 +- src/dialog.c | 2 +- src/dir.c | 2 +- src/editor/edit.c | 5 ++--- src/editor/editcmd.c | 5 +---- src/editor/editcmd_dialogs.c | 4 +--- src/editor/editdraw.c | 8 ++++---- src/editor/editkeys.c | 7 +++---- src/editor/editlock.c | 6 +++--- src/editor/syntax.c | 4 +--- src/file.c | 8 +++----- src/filegui.c | 2 +- src/find.c | 3 +-- src/help.c | 2 +- src/hotlist.c | 4 ++-- src/info.c | 2 +- src/keybind.c | 7 +++---- src/layout.c | 6 ++---- src/learn.c | 4 ++-- src/main.c | 3 ++- src/menu.c | 2 +- src/option.c | 5 ++--- src/panel.h | 5 +++-- src/panelize.c | 5 ++--- src/setup.c | 20 ++++++++++---------- src/subshell.c | 8 ++++---- src/tree.c | 2 +- src/user.c | 13 +++++++------ src/viewer/dialogs.c | 3 +-- src/viewer/display.c | 3 ++- src/viewer/lib.c | 5 +++-- src/viewer/mcviewer.c | 5 +++-- src/widget.c | 5 ++--- src/wtools.c | 4 +--- 63 files changed, 155 insertions(+), 150 deletions(-) create mode 100644 lib/strutil/Makefile.am diff --git a/configure.ac b/configure.ac index bc075c10a..15b098c28 100644 --- a/configure.ac +++ b/configure.ac @@ -583,6 +583,7 @@ lib/filehighlight/Makefile lib/mcconfig/Makefile lib/search/Makefile lib/skin/Makefile +lib/strutil/Makefile lib/tty/Makefile lib/vfs/Makefile lib/vfs/mc-vfs/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am index ec5286374..3f8939329 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = filehighlight mcconfig search skin tty vfs +SUBDIRS = filehighlight mcconfig search skin tty vfs strutil noinst_LTLIBRARIES = libmc.la @@ -24,6 +24,7 @@ libmc_la_LIBADD = \ filehighlight/libmcfilehighlight.la \ mcconfig/libmcconfig.la \ search/libsearch.la \ + strutil/libmcstrutil.la \ skin/libmcskin.la \ tty/libmctty.la \ $(INTLLIBS) $(MCLIBS) $(SLANGLIB) $(LIBICONV) $(GLIB_LIBS) diff --git a/lib/mcconfig/get.c b/lib/mcconfig/get.c index 881484666..cad30d961 100644 --- a/lib/mcconfig/get.c +++ b/lib/mcconfig/get.c @@ -20,9 +20,9 @@ #include #include "lib/global.h" +#include "lib/strutil.h" #include "mcconfig.h" -#include "src/strutil.h" /*** global variables **************************************************/ diff --git a/lib/mcconfig/set.c b/lib/mcconfig/set.c index d546b84dd..28d52bab6 100644 --- a/lib/mcconfig/set.c +++ b/lib/mcconfig/set.c @@ -20,9 +20,9 @@ #include #include "lib/global.h" +#include "lib/strutil.h" #include "mcconfig.h" -#include "src/strutil.h" /*** global variables **************************************************/ diff --git a/lib/search/glob.c b/lib/search/glob.c index b669e2f62..ad89273e9 100644 --- a/lib/search/glob.c +++ b/lib/search/glob.c @@ -29,12 +29,14 @@ #include "lib/global.h" -#include "search.h" -#include "internal.h" -#include "src/strutil.h" +#include "lib/strutil.h" + #include "src/strescape.h" #include "src/charsets.h" +#include "search.h" +#include "internal.h" + /*** global variables ****************************************************************************/ /*** file scope macro definitions ****************************************************************/ diff --git a/lib/search/hex.c b/lib/search/hex.c index d8259a09c..8dcbae29e 100644 --- a/lib/search/hex.c +++ b/lib/search/hex.c @@ -30,12 +30,14 @@ #include #include "lib/global.h" -#include "search.h" -#include "internal.h" -#include "src/strutil.h" +#include "lib/strutil.h" + #include "src/strescape.h" #include "src/charsets.h" +#include "search.h" +#include "internal.h" + /*** global variables ****************************************************************************/ /*** file scope macro definitions ****************************************************************/ diff --git a/lib/search/lib.c b/lib/search/lib.c index 09371fa28..5d0e44844 100644 --- a/lib/search/lib.c +++ b/lib/search/lib.c @@ -31,9 +31,10 @@ #include #include "lib/global.h" +#include "lib/strutil.h" + #include "search.h" #include "internal.h" -#include "src/strutil.h" #include "src/charsets.h" /*** global variables ****************************************************************************/ diff --git a/lib/search/normal.c b/lib/search/normal.c index 20e73ba7e..ef3c5b9bf 100644 --- a/lib/search/normal.c +++ b/lib/search/normal.c @@ -29,10 +29,12 @@ #include "lib/global.h" +#include "lib/strutil.h" + +#include "src/charsets.h" + #include "search.h" #include "internal.h" -#include "src/strutil.h" -#include "src/charsets.h" /*** global variables ****************************************************************************/ diff --git a/lib/search/regex.c b/lib/search/regex.c index 128f5435d..585ae2ba8 100644 --- a/lib/search/regex.c +++ b/lib/search/regex.c @@ -30,12 +30,14 @@ #include #include "lib/global.h" -#include "search.h" -#include "internal.h" -#include "src/strutil.h" +#include "lib/strutil.h" + #include "src/strescape.h" #include "src/charsets.h" +#include "search.h" +#include "internal.h" + /*** global variables ****************************************************************************/ /*** file scope macro definitions ****************************************************************/ diff --git a/lib/search/search.c b/lib/search/search.c index 318137693..078668e1e 100644 --- a/lib/search/search.c +++ b/lib/search/search.c @@ -31,10 +31,12 @@ #include #include "lib/global.h" +#include "lib/strutil.h" + +#include "src/charsets.h" + #include "search.h" #include "internal.h" -#include "src/strutil.h" -#include "src/charsets.h" /*** global variables ****************************************************************************/ diff --git a/lib/strutil/Makefile.am b/lib/strutil/Makefile.am new file mode 100644 index 000000000..9497e5a9a --- /dev/null +++ b/lib/strutil/Makefile.am @@ -0,0 +1,9 @@ +noinst_LTLIBRARIES = libmcstrutil.la + +libmcstrutil_la_SOURCES = \ + strutil8bit.c \ + strutilascii.c \ + strutil.c \ + strutilutf8.c + +libmcstrutil_la_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) diff --git a/lib/strutil/strutil.c b/lib/strutil/strutil.c index 2c5bd464d..717325c3e 100644 --- a/lib/strutil/strutil.c +++ b/lib/strutil/strutil.c @@ -31,7 +31,7 @@ #include #include "lib/global.h" -#include "strutil.h" +#include "lib/strutil.h" /*names, that are used for utf-8 */ static const char *str_utf8_encodings[] = { diff --git a/lib/strutil/strutil8bit.c b/lib/strutil/strutil8bit.c index 23c922536..f8a934fc0 100644 --- a/lib/strutil/strutil8bit.c +++ b/lib/strutil/strutil8bit.c @@ -28,7 +28,7 @@ #include #include "lib/global.h" -#include "strutil.h" +#include "lib/strutil.h" /* functions for singlebyte encodings, all characters have width 1 * using standard system functions diff --git a/lib/strutil/strutilascii.c b/lib/strutil/strutilascii.c index ce4697bcf..b8dd02846 100644 --- a/lib/strutil/strutilascii.c +++ b/lib/strutil/strutilascii.c @@ -28,7 +28,7 @@ #include #include #include "lib/global.h" -#include "strutil.h" +#include "lib/strutil.h" /* using g_ascii function from glib * on terminal are showed only ascii characters (lower then 0x80) diff --git a/lib/strutil/strutilutf8.c b/lib/strutil/strutilutf8.c index 5f7ecde43..f58536bc2 100644 --- a/lib/strutil/strutilutf8.c +++ b/lib/strutil/strutilutf8.c @@ -31,7 +31,7 @@ #include #include "lib/global.h" -#include "strutil.h" +#include "lib/strutil.h" /* using function for utf-8 from glib */ diff --git a/lib/tty/key.c b/lib/tty/key.c index 5df743b80..ad644a4bd 100644 --- a/lib/tty/key.c +++ b/lib/tty/key.c @@ -38,6 +38,13 @@ #include #include "lib/global.h" +#include "lib/strutil.h" /* str_casecmp */ + +#include "lib/vfs/mc-vfs/vfs.h" + +#ifdef ENABLE_VFS +#include "lib/vfs/mc-vfs/gc.h" +#endif /* ENABLE_VFS */ #include "tty.h" #include "tty-internal.h" /* mouse_enabled */ @@ -48,13 +55,7 @@ #include "src/main.h" #include "src/layout.h" /* winch_flag, mc_refresh() */ #include "src/cons.saver.h" -#include "src/strutil.h" /* str_casecmp */ -#include "lib/vfs/mc-vfs/vfs.h" - -#ifdef ENABLE_VFS -#include "lib/vfs/mc-vfs/gc.h" -#endif /* ENABLE_VFS */ #ifdef HAVE_TEXTMODE_X11_SUPPORT #include "x11conn.h" diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c index 2a1526caf..914f852d8 100644 --- a/lib/tty/tty-ncurses.c +++ b/lib/tty/tty-ncurses.c @@ -37,6 +37,9 @@ #include #include "lib/global.h" +#include "lib/strutil.h" /* str_term_form */ + +#include "src/main.h" #ifndef WANT_TERM_H # define WANT_TERM_H @@ -46,9 +49,6 @@ #include "tty.h" #include "color-internal.h" #include "win.h" -#include "src/main.h" - -#include "src/strutil.h" /* str_term_form */ /* include at last !!! */ #ifdef WANT_TERM_H diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index 667542a69..4e3a516b9 100644 --- a/lib/tty/tty-slang.c +++ b/lib/tty/tty-slang.c @@ -40,6 +40,7 @@ #include #include "lib/global.h" +#include "lib/strutil.h" /* str_term_form */ #include "tty-internal.h" /* slow_tty */ #include "tty.h" @@ -49,7 +50,6 @@ #include "key.h" /* define_sequence */ #include "win.h" -#include "src/strutil.h" /* str_term_form */ /*** global variables **************************************************/ extern int reset_hp_softkeys; diff --git a/lib/tty/tty.c b/lib/tty/tty.c index 34d628e70..3c869e19e 100644 --- a/lib/tty/tty.c +++ b/lib/tty/tty.c @@ -35,11 +35,11 @@ #include #include "lib/global.h" +#include "lib/strutil.h" #include "tty.h" #include "tty-internal.h" -#include "src/strutil.h" /*** global variables **************************************************/ diff --git a/lib/util.c b/lib/util.c index ec0442741..ab9309522 100644 --- a/lib/util.c +++ b/lib/util.c @@ -47,9 +47,9 @@ #include "lib/timefmt.h" #include "lib/fileloc.h" #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "src/file.h" /* copy_file_file() */ -#include "src/strutil.h" /*In order to use everywhere the same setup for the locale we use defines */ diff --git a/lib/vfs/mc-vfs/vfs.c b/lib/vfs/mc-vfs/vfs.c index 3533b3f4d..cc9be5b4a 100644 --- a/lib/vfs/mc-vfs/vfs.c +++ b/lib/vfs/mc-vfs/vfs.c @@ -51,10 +51,10 @@ #include #include "lib/global.h" +#include "lib/strutil.h" #include "src/wtools.h" /* message() */ #include "src/main.h" /* print_vfs_message */ -#include "src/strutil.h" #include "utilvfs.h" #include "gc.h" diff --git a/src/Makefile.am b/src/Makefile.am index 00562b680..5ec8fa364 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -68,11 +68,7 @@ SRC_mc_widgets = \ wtools.c wtools.h SRC_mc_strutils = \ - strescape.c strescape.h \ - strutil8bit.c \ - strutilascii.c \ - strutil.c strutil.h \ - strutilutf8.c + strescape.c strescape.h SRC_mc_conssaver = \ cons.handler.c cons.saver.h diff --git a/src/achown.c b/src/achown.c index 729c7c974..954bfc3f0 100644 --- a/src/achown.c +++ b/src/achown.c @@ -39,11 +39,11 @@ #include "lib/tty/key.h" /* XCTRL and ALT macros */ #include "lib/skin/skin.h" #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "wtools.h" /* For init_box_colors() */ -#include "strutil.h" #include "dir.h" #include "panel.h" /* Needed for the externs */ diff --git a/src/args.c b/src/args.c index 053b37d6e..60aa6d8c9 100644 --- a/src/args.c +++ b/src/args.c @@ -30,8 +30,9 @@ #include "lib/global.h" #include "lib/tty/tty.h" +#include "lib/strutil.h" + #include "src/args.h" -#include "src/strutil.h" #include "src/textconf.h" /*** external variables **************************************************************************/ diff --git a/src/boxes.c b/src/boxes.c index b6205ca1a..33c9533f1 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -39,8 +39,16 @@ #include "lib/tty/tty.h" #include "lib/skin/skin.h" /* INPUT_COLOR */ #include "lib/tty/key.h" /* XCTRL and ALT macros */ - #include "lib/mcconfig/mcconfig.h" /* Load/save user formats */ +#include "lib/strutil.h" + +#ifdef USE_NETCODE +# include "lib/vfs/mc-vfs/ftpfs.h" +#endif + +#ifdef ENABLE_VFS +#include "lib/vfs/mc-vfs/gc.h" +#endif #include "dialog.h" /* The nice dialog manager */ #include "widget.h" /* The widgets for the nice dialog manager */ @@ -54,21 +62,12 @@ #include "tree.h" #include "layout.h" /* for get_nth_panel_name proto */ #include "background.h" /* task_list */ -#include "strutil.h" #ifdef HAVE_CHARSET #include "charsets.h" #include "selcodepage.h" #endif -#ifdef USE_NETCODE -# include "lib/vfs/mc-vfs/ftpfs.h" -#endif - -#ifdef ENABLE_VFS -#include "lib/vfs/mc-vfs/gc.h" -#endif - static WRadio *display_radio; static WInput *display_user_format; diff --git a/src/charsets.c b/src/charsets.c index db4a09d9d..b290e72c2 100644 --- a/src/charsets.c +++ b/src/charsets.c @@ -30,11 +30,12 @@ #include #include "lib/global.h" -#include "charsets.h" -#include "strutil.h" /* utf-8 functions */ -#include "main.h" +#include "lib/strutil.h" /* utf-8 functions */ #include "lib/fileloc.h" +#include "charsets.h" +#include "main.h" + int n_codepages = 0; struct codepage_desc *codepages; diff --git a/src/chmod.c b/src/chmod.c index 523b1f4dd..8629f895a 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -36,6 +36,7 @@ #include "lib/tty/tty.h" #include "lib/skin/skin.h" #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "dialog.h" /* add_widget() */ #include "widget.h" /* NORMAL_BUTTON */ @@ -44,7 +45,6 @@ #include "main.h" /* update_panels() */ #include "layout.h" /* repaint_screen() */ #include "chmod.h" -#include "strutil.h" static int single_set; diff --git a/src/chown.c b/src/chown.c index f17788e52..38319d99b 100644 --- a/src/chown.c +++ b/src/chown.c @@ -37,10 +37,10 @@ #include "lib/tty/tty.h" #include "lib/skin/skin.h" #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" -#include "strutil.h" /* Needed for the extern declarations of integer parameters */ #include "dir.h" diff --git a/src/cmd.c b/src/cmd.c index 5688f040d..f41bd29d6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -56,6 +56,7 @@ #include "lib/filehighlight/fhl.h" /* MC_FHL_INI_FILE */ #include "lib/vfs/mc-vfs/vfs.h" #include "lib/fileloc.h" +#include "lib/strutil.h" #include "cmd.h" /* Our definitions */ #include "fileopctx.h" @@ -78,7 +79,6 @@ #include "setup.h" #include "execute.h" /* toggle_panels() */ #include "history.h" -#include "strutil.h" #include "dir.h" #include "cmddef.h" /* CK_InputHistoryShow */ diff --git a/src/complete.c b/src/complete.c index 6288f98ae..5d4173735 100644 --- a/src/complete.c +++ b/src/complete.c @@ -41,13 +41,13 @@ #include "lib/tty/tty.h" #include "lib/tty/key.h" /* XCTRL and ALT macros */ #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "wtools.h" #include "main.h" /* show_all_if_ambiguous */ #include "src/strescape.h" -#include "strutil.h" typedef char *CompletionFunction (const char * text, int state, INPUT_COMPLETE_FLAGS flags); diff --git a/src/dialog.c b/src/dialog.c index 3559348ab..f71893cb1 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -35,13 +35,13 @@ #include "lib/skin/skin.h" #include "lib/tty/mouse.h" #include "lib/tty/key.h" +#include "lib/strutil.h" #include "help.h" /* interactive_display() */ #include "dialog.h" #include "layout.h" #include "execute.h" /* suspend_cmd() */ #include "main.h" /* fast_refresh */ -#include "strutil.h" #include "setup.h" /* mouse_close_dialog */ /* Color styles for normal and error dialogs */ diff --git a/src/dir.c b/src/dir.c index 7c9eacaea..6c76763bf 100644 --- a/src/dir.c +++ b/src/dir.c @@ -32,10 +32,10 @@ #include "lib/search/search.h" #include "lib/vfs/mc-vfs/vfs.h" #include "lib/fs.h" +#include "lib/strutil.h" #include "wtools.h" #include "treestore.h" -#include "strutil.h" #include "dir.h" /* If true show files starting with a dot */ diff --git a/src/editor/edit.c b/src/editor/edit.c index cd5357104..2b3eb5787 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -44,15 +44,15 @@ #include "lib/tty/color.h" #include "lib/tty/tty.h" /* attrset() */ #include "lib/tty/key.h" /* is_idle() */ - #include "lib/skin/skin.h" /* EDITOR_NORMAL_COLOR */ +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" /* utf string functions */ #include "src/widget.h" #include "src/cmd.h" /* view_other_cmd() */ #include "src/user.h" /* user_menu_cmd() */ #include "src/wtools.h" /* query_dialog() */ #include "lib/timefmt.h" /* time formatting */ -#include "src/strutil.h" /* utf string functions */ #include "src/charsets.h" /* get_codepage_id */ #include "src/main.h" /* source_codepage */ #include "src/learn.h" /* learn_keys */ @@ -62,7 +62,6 @@ #include "editlock.h" #include "edit-widget.h" -#include "lib/vfs/mc-vfs/vfs.h" int option_word_wrap_line_length = 72; int option_typewriter_wrap = 0; diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 41974f80e..d74c92325 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -46,13 +46,11 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" #include "lib/tty/key.h" /* XCTRL */ - #include "lib/mcconfig/mcconfig.h" - #include "lib/skin/skin.h" +#include "lib/strutil.h" /* utf string functions */ #include "src/history.h" #include "src/widget.h" /* listbox_new() */ @@ -62,7 +60,6 @@ #include "src/wtools.h" /* message() */ #include "src/charsets.h" #include "src/selcodepage.h" -#include "src/strutil.h" /* utf string functions */ #include "src/cmddef.h" #include "lib/vfs/mc-vfs/vfs.h" diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c index 6482a039b..435175a85 100644 --- a/src/editor/editcmd_dialogs.c +++ b/src/editor/editcmd_dialogs.c @@ -27,17 +27,15 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" #include "lib/skin/skin.h" /* INPUT_COLOR */ #include "lib/tty/key.h" - #include "lib/search/search.h" +#include "lib/strutil.h" #include "src/dialog.h" #include "src/widget.h" #include "src/wtools.h" -#include "src/strutil.h" #include "src/main.h" #include "src/history.h" #include "src/charsets.h" diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c index 09ff84eda..56852d3de 100644 --- a/src/editor/editdraw.c +++ b/src/editor/editdraw.c @@ -39,19 +39,19 @@ #include #include "lib/global.h" +#include "lib/tty/tty.h" /* tty_printf() */ +#include "lib/skin/skin.h" +#include "lib/tty/key.h" /* is_idle() */ +#include "lib/strutil.h" /* utf string functions */ #include "edit-impl.h" #include "edit-widget.h" #define MAX_LINE_LEN 1024 -#include "lib/tty/tty.h" /* tty_printf() */ -#include "lib/skin/skin.h" -#include "lib/tty/key.h" /* is_idle() */ #include "src/widget.h" /* buttonbar_redraw() */ #include "src/charsets.h" -#include "src/strutil.h" /* utf string functions */ #include "src/main.h" /* source_codepage */ /* Text styles */ diff --git a/src/editor/editkeys.c b/src/editor/editkeys.c index 5b2f52d9a..4ae36b811 100644 --- a/src/editor/editkeys.c +++ b/src/editor/editkeys.c @@ -40,19 +40,18 @@ #include #include "lib/global.h" +#include "lib/tty/tty.h" /* keys */ +#include "lib/tty/key.h" /* KEY_M_SHIFT */ +#include "lib/strutil.h" /* str_isutf8 () */ #include "edit-impl.h" #include "edit-widget.h" /* edit->macro_i */ #include "editcmd_dialogs.h" -#include "lib/tty/tty.h" /* keys */ -#include "lib/tty/key.h" /* KEY_M_SHIFT */ - #include "src/cmddef.h" /* list of commands */ #include "src/keybind.h" /* lookup_keymap_command() */ #include "src/charsets.h" /* convert_from_input_c() */ #include "src/main.h" /* display_codepage */ -#include "src/strutil.h" /* str_isutf8 () */ /* * Translate the keycode into either 'command' or 'char_for_insertion'. diff --git a/src/editor/editlock.c b/src/editor/editlock.c index 07575a4f8..c7982ca86 100644 --- a/src/editor/editlock.c +++ b/src/editor/editlock.c @@ -53,14 +53,14 @@ #include #include "lib/global.h" +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" /* utf string functions */ + #include "edit-impl.h" #include "editlock.h" #include "src/wtools.h" /* edit_query_dialog () */ -#include "src/strutil.h" /* utf string functions */ - -#include "lib/vfs/mc-vfs/vfs.h" #define BUF_SIZE 255 #define PID_BUF_SIZE 10 diff --git a/src/editor/syntax.c b/src/editor/syntax.c index b4eb70e98..37832e716 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -47,14 +47,12 @@ #include #include "lib/global.h" - #include "lib/search/search.h" /* search engine */ - #include "lib/skin/skin.h" +#include "lib/strutil.h" /* utf string functions */ #include "src/main.h" /* mc_home */ #include "src/wtools.h" /* message() */ -#include "src/strutil.h" /* utf string functions */ #include "edit-impl.h" #include "edit-widget.h" diff --git a/src/file.c b/src/file.c index 18543df9d..44b88b084 100644 --- a/src/file.c +++ b/src/file.c @@ -57,11 +57,12 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" #include "lib/tty/key.h" - #include "lib/search/search.h" +#include "lib/vfs/mc-vfs/vfs-impl.h" +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "setup.h" #include "dialog.h" @@ -72,7 +73,6 @@ #include "wtools.h" #include "background.h" /* we_are_background */ #include "src/strescape.h" -#include "strutil.h" /* Needed for current_panel, other_panel and WTree */ #include "dir.h" @@ -80,8 +80,6 @@ #include "file.h" #include "filegui.h" #include "tree.h" -#include "lib/vfs/mc-vfs/vfs-impl.h" -#include "lib/vfs/mc-vfs/vfs.h" /* }}} */ diff --git a/src/filegui.c b/src/filegui.c index 55403af87..042fb2a23 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -81,6 +81,7 @@ #include "lib/tty/key.h" /* tty_get_event */ #include "lib/search/search.h" #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "setup.h" /* verbose */ #include "dialog.h" /* do_refresh() */ @@ -91,7 +92,6 @@ #include "panel.h" /* current_panel */ #include "fileopctx.h" /* FILE_CONT */ #include "filegui.h" -#include "strutil.h" #include "src/strescape.h" /* }}} */ diff --git a/src/find.c b/src/find.c index 8812e95bb..20fa3a842 100644 --- a/src/find.c +++ b/src/find.c @@ -39,11 +39,10 @@ #include "lib/skin/skin.h" #include "lib/search/search.h" #include "lib/mcconfig/mcconfig.h" - #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" #include "setup.h" /* verbose */ -#include "strutil.h" #include "dialog.h" #include "widget.h" #include "dir.h" diff --git a/src/help.c b/src/help.c index 1e615b203..31b7b2bb0 100644 --- a/src/help.c +++ b/src/help.c @@ -57,11 +57,11 @@ #include "lib/skin/skin.h" #include "lib/tty/mouse.h" #include "lib/tty/key.h" +#include "lib/strutil.h" #include "dialog.h" /* For Dlg_head */ #include "widget.h" /* For Widget */ #include "wtools.h" /* For common_dialog_repaint() */ -#include "strutil.h" #include "cmddef.h" #include "keybind.h" #include "help.h" diff --git a/src/hotlist.c b/src/hotlist.c index f767792da..84492760e 100644 --- a/src/hotlist.c +++ b/src/hotlist.c @@ -45,12 +45,13 @@ #include "lib/tty/tty.h" /* COLS */ #include "lib/skin/skin.h" #include "lib/tty/key.h" /* KEY_M_CTRL */ +#include "lib/mcconfig/mcconfig.h" /* Load/save directories hotlist */ #include "lib/fileloc.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "setup.h" /* For profile_bname */ -#include "lib/mcconfig/mcconfig.h" /* Load/save directories hotlist */ #include "wtools.h" /* QuickDialog */ #include "panel.h" /* current_panel */ #include "main.h" /* update_panels() */ @@ -58,7 +59,6 @@ #include "hotlist.h" #include "command.h" /* cmdline */ #include "history.h" -#include "strutil.h" #define UX 5 #define UY 2 diff --git a/src/info.c b/src/info.c index e6803ca1f..c20f2065d 100644 --- a/src/info.c +++ b/src/info.c @@ -31,6 +31,7 @@ #include "lib/tty/mouse.h" /* Gpm_Event */ #include "lib/skin/skin.h" #include "lib/unixcompat.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" /* default_proc*/ @@ -41,7 +42,6 @@ #include "menu.h" /* menubar_visible */ #include "layout.h" #include "mountlist.h" -#include "strutil.h" #include "info.h" #ifndef VERSION diff --git a/src/keybind.c b/src/keybind.c index 8859e5f5e..6c3f2ab4f 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -35,14 +35,13 @@ #include #include "lib/global.h" - -#include "cmddef.h" /* CK_ cmd name const */ #include "lib/tty/win.h" #include "lib/tty/key.h" /* KEY_M_ */ #include "lib/tty/tty.h" /* keys */ -#include "wtools.h" -#include "strutil.h" +#include "lib/strutil.h" +#include "cmddef.h" /* CK_ cmd name const */ +#include "wtools.h" #include "keybind.h" static name_keymap_t command_names[] = { diff --git a/src/layout.c b/src/layout.c index f311a910d..4c1a930ff 100644 --- a/src/layout.c +++ b/src/layout.c @@ -45,14 +45,14 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" #include "lib/skin/skin.h" #include "lib/tty/key.h" #include "lib/tty/mouse.h" #include "lib/tty/win.h" /* do_enter_ca_mode() */ - #include "lib/mcconfig/mcconfig.h" +#include "lib/vfs/mc-vfs/vfs.h" /* For vfs_translate_url() */ +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" @@ -62,7 +62,6 @@ #include "subshell.h" /* For use_subshell and resize_subshell() */ #include "tree.h" #include "menu.h" -#include "strutil.h" #include "background.h" /* we_are_background */ /* Needed for the extern declarations of integer parameters */ #include "dir.h" @@ -73,7 +72,6 @@ #include "src/viewer/mcviewer.h" /* The view widget */ #include "setup.h" /* For save_setup() */ -#include "lib/vfs/mc-vfs/vfs.h" /* For vfs_translate_url() */ /* Controls the display of the rotating dash on the verbose mode */ int nice_rotating_dash = 1; diff --git a/src/learn.c b/src/learn.c index cb35c3e0d..bf7e8ebb3 100644 --- a/src/learn.c +++ b/src/learn.c @@ -38,15 +38,15 @@ #include "lib/tty/tty.h" #include "lib/tty/key.h" +#include "lib/mcconfig/mcconfig.h" /* Save profile */ +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" -#include "lib/mcconfig/mcconfig.h" /* Save profile */ #include "setup.h" #include "layout.h" /* repaint_screen() */ #include "learn.h" #include "wtools.h" -#include "strutil.h" #include "strescape.h" #define UX 4 diff --git a/src/main.c b/src/main.c index de961c3fb..a69cf09c5 100644 --- a/src/main.c +++ b/src/main.c @@ -61,6 +61,8 @@ #include "lib/vfs/mc-vfs/gc.h" #endif +#include "lib/strutil.h" + #include "src/args.h" #include "dir.h" @@ -82,7 +84,6 @@ #include "listmode.h" #include "execute.h" #include "ext.h" /* For flush_extension_file() */ -#include "strutil.h" #include "widget.h" #include "command.h" #include "wtools.h" diff --git a/src/menu.c b/src/menu.c index f2d4b1ac2..8da309fa2 100644 --- a/src/menu.c +++ b/src/menu.c @@ -32,13 +32,13 @@ #include "lib/skin/skin.h" #include "lib/tty/mouse.h" #include "lib/tty/key.h" /* key macros */ +#include "lib/strutil.h" #include "cmddef.h" /* CK_Ignore_Key */ #include "help.h" #include "dialog.h" #include "widget.h" #include "main.h" /* is_right */ -#include "strutil.h" #include "menu.h" int menubar_visible = 1; /* This is the new default */ diff --git a/src/option.c b/src/option.c index bbc211f43..841933917 100644 --- a/src/option.c +++ b/src/option.c @@ -31,15 +31,14 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" +#include "lib/mcconfig/mcconfig.h" /* For mc_config_save_file */ +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "setup.h" /* For save_setup() */ #include "main.h" -#include "lib/mcconfig/mcconfig.h" /* For mc_config_save_file */ -#include "strutil.h" #include "panel.h" /* Needed for the externs */ #include "file.h" /* safe_delete */ #include "layout.h" /* For nice_rotating_dash */ diff --git a/src/panel.h b/src/panel.h index 047052522..e84a80c28 100644 --- a/src/panel.h +++ b/src/panel.h @@ -6,10 +6,11 @@ #ifndef MC_PANEL_H #define MC_PANEL_H +#include "lib/fs.h" /* MC_MAXPATHLEN */ +#include "lib/strutil.h" + #include "dir.h" /* dir_list */ #include "dialog.h" /* Widget */ -#include "lib/fs.h" /* MC_MAXPATHLEN */ -#include "strutil.h" #define selection(p) (&(p->dir.list[p->selected])) #define DEFAULT_USER_FORMAT "half type name | size | perm" diff --git a/src/panelize.c b/src/panelize.c index 76d798419..4fb7b6b01 100644 --- a/src/panelize.c +++ b/src/panelize.c @@ -36,21 +36,20 @@ #include "lib/global.h" #include "lib/skin/skin.h" - #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/mcconfig/mcconfig.h" /* Load/save directories panelize */ +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "wtools.h" /* For common_dialog_repaint() */ #include "setup.h" /* For profile_bname */ -#include "lib/mcconfig/mcconfig.h" /* Load/save directories panelize */ #include "dir.h" #include "panel.h" /* current_panel */ #include "layout.h" /* repaint_screen() */ #include "main.h" #include "panelize.h" #include "history.h" -#include "strutil.h" #define UX 5 #define UY 2 diff --git a/src/setup.c b/src/setup.c index b2a787bd0..794552a89 100644 --- a/src/setup.c +++ b/src/setup.c @@ -37,6 +37,16 @@ #include "lib/mcconfig/mcconfig.h" #include "lib/fileloc.h" +#ifdef ENABLE_VFS +#include "lib/vfs/mc-vfs/gc.h" +#endif + +#ifdef USE_NETCODE +# include "lib/vfs/mc-vfs/ftpfs.h" +# include "lib/vfs/mc-vfs/fish.h" +#endif +#include "lib/strutil.h" /* str_isutf8 () */ + #include "args.h" #include "dir.h" #include "panel.h" @@ -53,24 +63,14 @@ #include "keybind.h" /* lookup_action */ #include "wtools.h" -#ifdef ENABLE_VFS -#include "lib/vfs/mc-vfs/gc.h" -#endif - #ifdef HAVE_CHARSET #include "charsets.h" #endif -#ifdef USE_NETCODE -# include "lib/vfs/mc-vfs/ftpfs.h" -# include "lib/vfs/mc-vfs/fish.h" -#endif - #ifdef USE_INTERNAL_EDIT # include "src/editor/edit.h" #endif -#include "src/strutil.h" /* str_isutf8 () */ extern int num_history_items_recorded; diff --git a/src/subshell.c b/src/subshell.c index 22c1c6f45..ea9993670 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -49,15 +49,15 @@ #include "lib/global.h" #include "lib/tty/tty.h" /* LINES */ +#include "lib/tty/key.h" /* XCTRL */ +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" + #include "panel.h" /* current_panel */ #include "wtools.h" /* query_dialog() */ #include "main.h" /* do_update_prompt() */ #include "cons.saver.h" /* handle_console() */ -#include "lib/tty/key.h" /* XCTRL */ #include "subshell.h" -#include "strutil.h" - -#include "lib/vfs/mc-vfs/vfs.h" #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) diff --git a/src/tree.c b/src/tree.c index f79e6910d..208f1d1a5 100644 --- a/src/tree.c +++ b/src/tree.c @@ -47,6 +47,7 @@ #include "lib/tty/key.h" #include "lib/vfs/mc-vfs/vfs.h" #include "lib/fileloc.h" +#include "lib/strutil.h" #include "wtools.h" /* message() */ #include "dir.h" @@ -64,7 +65,6 @@ #include "cmddef.h" #include "keybind.h" #include "history.h" -#include "strutil.h" #include "tree.h" const global_keymap_t *tree_map; diff --git a/src/user.c b/src/user.c index f4d1489d0..8c0520f9f 100644 --- a/src/user.c +++ b/src/user.c @@ -31,6 +31,13 @@ #include "lib/global.h" #include "lib/tty/tty.h" #include "lib/skin/skin.h" +#include "lib/search/search.h" +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" + +#include "src/editor/edit.h" /* WEdit, BLOCK_FILE */ +#include "src/viewer/mcviewer.h" /* for default_* externs */ + #include "dir.h" #include "panel.h" #include "main.h" @@ -39,18 +46,12 @@ #include "execute.h" #include "setup.h" #include "history.h" -#include "strutil.h" -#include "lib/search/search.h" -#include "lib/vfs/mc-vfs/vfs.h" - -#include "src/editor/edit.h" /* WEdit, BLOCK_FILE */ /* For the simple listbox manager */ #include "dialog.h" #include "widget.h" #include "wtools.h" -#include "src/viewer/mcviewer.h" /* for default_* externs */ #define MAX_ENTRIES 16 #define MAX_ENTRY_LEN 60 diff --git a/src/viewer/dialogs.c b/src/viewer/dialogs.c index 1b86e4b14..36c9ec8f9 100644 --- a/src/viewer/dialogs.c +++ b/src/viewer/dialogs.c @@ -41,13 +41,12 @@ #include #include "lib/global.h" - #include "lib/search/search.h" +#include "lib/strutil.h" #include "src/wtools.h" #include "src/history.h" #include "src/charsets.h" -#include "src/strutil.h" #include "internal.h" diff --git a/src/viewer/display.c b/src/viewer/display.c index 3b6323afb..76b1438be 100644 --- a/src/viewer/display.c +++ b/src/viewer/display.c @@ -41,7 +41,8 @@ #include "lib/skin/skin.h" #include "lib/tty/tty.h" #include "lib/tty/key.h" -#include "src/strutil.h" +#include "lib/strutil.h" + #include "src/main.h" #include "src/dialog.h" /* Dlg_head */ #include "src/widget.h" /* WButtonBar */ diff --git a/src/viewer/lib.c b/src/viewer/lib.c index 00dc7ad06..0e7b88636 100644 --- a/src/viewer/lib.c +++ b/src/viewer/lib.c @@ -40,12 +40,13 @@ #include #include "lib/global.h" +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" + #include "src/wtools.h" -#include "src/strutil.h" #include "src/main.h" #include "src/charsets.h" #include "src/selcodepage.h" -#include "lib/vfs/mc-vfs/vfs.h" #include "internal.h" #include "mcviewer.h" diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c index eed39955c..07d91e504 100644 --- a/src/viewer/mcviewer.c +++ b/src/viewer/mcviewer.c @@ -41,13 +41,14 @@ #include "lib/global.h" #include "lib/tty/tty.h" -#include "src/strutil.h" +#include "lib/vfs/mc-vfs/vfs.h" +#include "lib/strutil.h" + #include "src/main.h" #include "src/charsets.h" #include "src/main-widgets.h" /* the_menubar */ #include "src/menu.h" /* menubar_visible */ #include "src/widget.h" -#include "lib/vfs/mc-vfs/vfs.h" #include "internal.h" #include "mcviewer.h" diff --git a/src/widget.c b/src/widget.c index 70059517d..baf9733cb 100644 --- a/src/widget.c +++ b/src/widget.c @@ -47,14 +47,13 @@ #include "lib/tty/mouse.h" #include "lib/tty/key.h" /* XCTRL and ALT macros */ #include "lib/mcconfig/mcconfig.h" /* for history loading and saving */ -#include "lib/fileloc.h" - #include "lib/vfs/mc-vfs/vfs.h" +#include "lib/fileloc.h" +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "wtools.h" -#include "strutil.h" #include "cmddef.h" /* CK_ cmd name const */ #include "keybind.h" /* global_keymap_t */ diff --git a/src/wtools.c b/src/wtools.c index 43dfb125d..e7e362855 100644 --- a/src/wtools.c +++ b/src/wtools.c @@ -34,17 +34,15 @@ #include #include "lib/global.h" - #include "lib/tty/tty.h" #include "lib/tty/key.h" /* tty_getch() */ - #include "lib/skin/skin.h" /* INPUT_COLOR */ +#include "lib/strutil.h" #include "dialog.h" #include "widget.h" #include "wtools.h" #include "background.h" /* parent_call */ -#include "strutil.h" Listbox *