Commit Graph

69 Commits

Author SHA1 Message Date
Slava Zanko
8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Slava Zanko
c2754de8aa Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:46 +03:00
Andrew Borodin
a8e63cd2c0 Fixed complile warnings about warn_unused_result attribute.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
95e4424e92 Renamed current_dlg variable to top_dlg.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
aa0d96bd8b Ticket #1646: removed leading and trailing spaces in i18n resources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:46 +04:00
Andrew Borodin
4cea5be1ac Ticket #2097: clean up before 4.7.2 release.
Split assignments and conditions. Type accuracy. Minor optimization.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:23:51 +04:00
Slava Zanko
3a1e0966ae Final Indentation of all touched files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:21 +03:00
Slava Zanko
35dae723ee Changes into src directory:
* src/background.c:
   * handling read() errors in background_attention()
   * handling IO errors in parent_call_string()
   * ignoring IO errors in background_attention()
   * ignoring write() errors in parent_call_header()
   * ignore IO errors in parent_call()
 *  src/cons.saver.c:
   * handling IO errors in show_console_contents_linux()
   * handling IO errors in handle_console_linux()
 * src/file.c: handling mc_chdir() errors in panel_operate
 * src/find.c: ignoring errors on chdir() call
 * src/main.c:
   * ignoring errors on last write()'s in main()
   * ignoring mc_chdir() errors in setup_dummy_mc()
   * ignoring mc_chdir() errors in translated_mc_chdir()
 * src/panelize.c: ignoring errors on chdir() call
 * src/screen.c:
   * ignoring mc_chdir() errors in panel_new_with_dir()
   * ignoring mc_chdir() errors in reload_panelized()
   * ignoring mc_chdir() errors in update_panels()
 * src/subshell.c: ignoring errors on chdir() call
 * src/tree.c: ignoring mc_chdir() errors in tree_rescan()
 * src/treestore.c: handling read errors in tree_store_load_from()
 * src/widget.c: handling mc_write() errors in save_text_to_clip_file

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:20 +03:00
Slava Zanko
93dbc46e9c Reorganization of sources. Part 1.
* moved src/global.h into lib/global.h
 * moved glibcompat.[ch] from ./src/ into ./lib/
 * moved fs.h from ./src/ into ./lib/

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00
Slava Zanko
39d5b94cac Reorganized pathes to files in '#include' directives 2010-01-26 10:30:22 +02:00
Slava Zanko
ddb9ada2e8 Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko
51f10b3038 Cleanup of code for compile with new warnings options for compilator
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-30 20:36:48 +02:00
Alexander Moiseenko
936727622d Fixed problems:
* When try to replace existing file in background operation
  assertion raised (created operations for initialization ctx->ui for background):
  ** (mc:25716): CRITICAL **: file_progress_real_query_replace: assertion `ctx->ui != NULL' failed

 * Process has been already done, but still draw in list (C-x j)

 * Process is stopped or worked, remove operation don't hide process from list, but kill it

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-28 12:05:07 +02:00
Alexander Moiseenko
81f5b5e0b8 Ticket #1500: Segmentation fault while background copying
Test case:
 * create file with name "test" in "tmp" directory (for example)
 * create directory with same name ("test") in other "tmp2" directory (for example)
 * try to copy or move file "test" into "tmp2" in background mode
 * wait for some time

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-28 12:05:06 +02:00
Andrew Borodin
bd0d344802 TTY: moved repaint_screen() from src/main.[ch] to src/layout.[ch].
Fixed includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
55e626726c For NCurses, always call doupdate() in tty_refresh(). 2009-08-12 21:23:12 +04:00
Andrew Borodin
069aab9ebc Renamed mc_refresh() to tty_refresh(). 2009-08-12 21:22:17 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Andrew Borodin
5f61e9aaa4 Fixed missed #include's after rebase to current master. 2009-06-18 21:06:25 +04:00
Enrico Weigelt, metux IT service
c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Slava Zanko
10b7bdb361 Project now build with:
make CFLAGS="-ansi -pedantic -Wall -Wextra -Werror"

WARNING! Builds wuthout samba.
2009-04-24 01:47:22 +03:00
Mikhail S. Pobolovets
758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Patrick Winnertz
1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Enrico Weigelt, metux IT service
154feb5160 2009-01-10 Enrico Weigelt, metux ITS <weigelt@metux.de>
* edit/editcmd.c:
    * src/achown.c src/background.c src/boxes.c src/chmod.c:
    * src/chown.c src/cmd.c src/command.c src/dir.c src/execute.c:
    * src/ext.c src/file.c src/filegui.c src/find.c src/help.c:
    * src/learn.c src/main.c src/panelize.c src/screen.c:
    * src/selcodepage.c src/subshell.c src/tree.c src/user.c:
    * src/utilunix.c src/view.c:
    * vfs/cpio.c vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c:
    * vfs/mcfs.c vfs/sfs.c vfs/smbfs.c vfs/tar.c vfs/undelfs.c:
    * vfs/utilvfs.c vfs/vfs.c:

    Changed message type codes on calls to message(), query_dialog(),
    close_error_pipe() from numeric IDs to symbols D_ERROR, D_NORMAL
2009-01-10 14:13:56 +01:00
Pavel Tsekov
2f3df3af4e * edit/bookmark.c: Update copyright notice.
* edit/edit.c: Likewise.
* edit/editcmd.c: Likewise.
* edit/editdraw.c: Likewise.
* edit/editkeys.c: Likewise.
* edit/editlock.c: Likewise.
* edit/editmenu.c: Likewise.
* edit/editoptions.c: Likewise.
* edit/editwidget.c: Likewise.
* edit/syntax.c: Likewise.
* src/background.c: Likewise.
* src/boxes.c: Likewise.
* src/complete.c: Likewise.
* src/execute.c: Likewise.
* src/ext.c: Likewise.
* src/file.c: Likewise.
* src/filegui.c: Likewise.
* src/fileopctx.c: Likewise.
* src/find.c: Likewise.
* src/hotlist.c: Likewise.
* src/key.c: Likewise.
* src/keyxdef.c: Likewise.
* src/layout.c: Likewise.
* src/learn.c: Likewise.
* src/listmode.c: Likewise.
* src/main.c: Likewise.
* src/panelize.c: Likewise.
* src/slint.c: Likewise.
* src/textconf.c: Likewise.
* src/tree.c: Likewise.
* src/treestore.c: Likewise.
* src/tty.c: Likewise.
* src/util.c: Likewise.
* src/utilunix.c: Likewise.
* src/view.c: Likewise.
* src/widget.c: Likewise.
* src/wtools.c: Likewise.
* src/x11conn.c: Likewise.
* vfs/cpio.c: Likewise.
* vfs/extfs.c: Likewise.
* vfs/fish.c: Likewise.
* vfs/ftpfs.c: Likewise.
* vfs/gc.c: Likewise.
* vfs/mcfs.c: Likewise.
* vfs/mcserv.c: Likewise.
* vfs/smbfs.c: Likewise.
* vfs/tar.c: Likewise.
2007-09-25 15:33:35 +00:00
Pavel Tsekov
23361694b6 * src/background.c: Use the correct form of FSF's name in the copyright
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Roland Illig
9c334b4dd8 * achown.c: Added const qualifiers and const_cast.
* background.c: likewise.
	* boxes.c: likewise.
	* file.c: likewise.
	* filegui.c: likewise.
	* find.c: likewise.
	* hotlist.c: likewise.
	* info.c: likewise.
	* layout.c: likewise.
	* myslang.h: likewise.
	* option.c: likewise.
	* user.c: likewise.
	* util.c: likewise.
	* utilunix.c: likewise.
	* view.c: likewise.
	* widget.c: likewise.
2004-09-19 15:55:58 +00:00
Roland Illig
b86b6a7bc7 * background.c (do_background): Fixed file descriptor leak. 2004-08-29 18:57:31 +00:00
Andrew V. Samoilov
6776c2cdb9 do_background: Use O_RDWR when opening the file '/dev/null'
for replacement standard streams.
2004-08-17 20:01:58 +00:00
Roland Illig
6cefb6d3bb Made the data type of some variables more appropriate. 2004-08-16 03:12:05 +00:00
Pavel Roskin
a128188ae1 Warning fixes for FreeBSD 5.1. 2003-11-21 03:17:18 +00:00
Pavel Roskin
26e444a11c * background.c (tell_parent): Eliminate.
(background_attention): Use error code instead.
* file.c (panel_operate): Exit with code 0, not 1.
2003-10-26 05:42:29 +00:00
Pavel Roskin
a08f91eb63 * background.c: Clean up includes.
(do_background): Set current_dlg to NULL for the child process.
* dialog.h (do_complete_refresh): Don't use we_are_background.
* file.h: Remove dependency on background.h.
* background.h: Define we_are_background.  Move mc_message() ...
* wtools.h: ... here.
* key.h: Don't define we_are_background.
* slint.c (mc_refresh): Use current_dialog instead of
we_are_background to fix compilation without WITH_BACKGROUND.
2003-10-26 00:58:14 +00:00
Pavel Roskin
ec7f14f929 * background.c (do_background): Use pipe() instead of less
portable socketpair().  Close comm[0] in the child.
2003-10-25 22:15:52 +00:00
Pavel Roskin
00d12acfb3 * background.c: Leave only code used when WITH_BACKGROUND is
defined. The rest goes ...
* wtools.c: ... here.
2003-10-25 21:54:55 +00:00
Pavel Roskin
67e8519191 * background.c: Remove mymsg. 2003-10-25 21:15:54 +00:00
Pavel Roskin
2d33b5047e * background.c: Replace all message stubs with a new function
mc_message().  Protect against strlen(MSG_ERROR).  Adjust all
dependencies.
2003-10-25 19:54:24 +00:00
Pavel Roskin
636d457a87 * background.c (background_attention): Unregister task before
calling message() to avoid recursion.
(message_3s): Fix the number of arguments.
2003-10-25 07:19:31 +00:00
Pavel Roskin
98950838b4 * dlg.h: Merge with ...
* dialog.h: ... this.  Adjust all dependencies.
* dlg.c: Merge with ...
* dialog.c: ... this.
* Makefile.am (SRCS): Remove dlg.h and dlg.c.
2003-10-24 23:20:30 +00:00
Pavel Roskin
82a7b75a7b * fileopctx.h: Define struct FileOpContext.
* background.h: Avoid conditional declarations.
2003-10-24 18:28:32 +00:00
Pavel Roskin
0a3cfe30c3 * background.h: Eliminate background_wait variable. Adjust all
dependencies.
2003-10-08 05:16:58 +00:00
Pavel Roskin
341ad1d804 Fix typos and "britainisms". 2003-06-02 18:13:42 +00:00
Pavel Roskin
0e9e693c9d * background.c (background_attention): Fix calling functions
with wrong arguments, which resulted in segmentation faults.
2002-09-28 05:10:29 +00:00
Pavel Roskin
c785d4195b * global.h: Move fcntl.h inclusion here. Define O_BINARY.
* mountlist.c: Remove more includes already handled in global.h.
2002-09-23 06:43:22 +00:00
Pavel Roskin
8c9fc66db0 * background.c (background_attention): Cast pointer to long
instead of int because it's unsafe of 64-bit systems.
* main.c (init_xterm_support): Likewise.
2002-02-21 01:49:29 +00:00
Pavel Roskin
fa89635b51 Fully eliminate all references to HAVE_X and HAVE_GNOME. 2001-11-14 23:20:37 +00:00