Commit Graph

82 Commits

Author SHA1 Message Date
Andrew Borodin f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +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 0a7899709b Simple doxygen description for files in vfs (not subdirs) directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:18:55 +02:00
Slava Zanko e54f318cef Completely removed MHL stuff
Changed all source files relative to remove MHL

Some string-related functions moved into src/util.c

This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz d84586ba82 Reverted the use of mhl_str_dup and use g_strdup instead.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01: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 8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +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 2e0edf8672 Merge commit 'origin/205_inttypes_64bit_error' 2009-01-24 19:19:49 +01:00
Enrico Weigelt, metux IT service 5d150562aa merged 158_message_codes branch 2009-01-24 04:53:51 +01:00
Enrico Weigelt, metux IT service 3ca5a91b9a vfs/cpio.c: read functions now return ssize_t 2009-01-24 02:34:43 +01:00
Enrico Weigelt, metux IT service 183a66f7f5 changing return types of *read() and *write() functions to ssize_t 2009-01-13 19:00:25 +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
Pavel Roskin fc6e8e67f2 * cpio.c (cpio_find_head): Fix for logical error that can cause
crash on broken cpio archives.
2005-03-29 05:24:26 +00:00
Roland Illig d7e7ec48dd * *.c: Declared unused variables with (void) to avoid the gcc
warnings.
	* extfs.c (extfs_get_path_mangle, extfs_get_path): Removed unused
	parameter.
	* ftpfs.c (ftpfs_netrc_bad_mode): Likewise.
	* vfs.c (mc_def_getlocalcopy): Likewise.
2005-02-22 18:35:22 +00:00
Roland Illig 54cccec688 * utilvfs.h: Removed unneeded #includes.
* *.c: Added the #includes that have been removed from utilvfs.h.
	* tcputil.c: Just removed the unneeded #include "utilvfs.h".
2005-02-19 16:36:38 +00:00
Roland Illig ab442fdeee * cpio.c: Added some FIXMEs about data representation. 2005-02-08 05:53:13 +00:00
Roland Illig 9558c7178f * src/info.c (info_show_info): Enabled display of the device number,
for the case that the column in the directory listing is too
	short. This had been disabled since 1994, for no obvious reason
	and without any comment.
	* src/screen.c (format_device_number): Added. Converts a device number
	into a bounded string.
	* screen.c (string_file_size): Support for larger device numbers
	(and for non-Linux systems).
	* vfs/cpio.c (cpio_read_crc_head): Fixed device number handling for
	non-Linux systems.
	* vfs/fish.c (fish_dir_load): Likewise.
	* vfs/utilvfs.c (vfs_parse_ls_lga): Likewise.
2005-01-27 23:32:13 +00:00
Andrew V. Samoilov fd5d77fc7b * cpio.c (cpio_create_entry): Added initial support for the Special
Named Files. Needed on QNX Neutrino.
2004-11-03 20:32:35 +00:00
Andrew V. Samoilov 126fa4d83d * cpio.c (cpio_find_head): Check mc_read() return value.
(cpio_read_crc_head): Handle mc_read() return value properly.
        (cpio_read_oldc_head): Use union for "st" and "buf".
        (cpio_read_crc_head): Likewise.
2004-10-06 21:17:30 +00:00
Roland Illig 4bc786735e * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* direntry.c: Likewise.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* mcfs.c: Likewise.
	* tar.c: Likewise.
	* undelfs.c: Likewise.
	* vfs.c: Likewise.
2004-09-24 15:08:21 +00:00
Roland Illig 60465dace3 * cpio.c (cpio_read_bin_head): Replaced GUINT16_SWAP_LE_BE with
GUINT16_SWAP_LE_BE_CONSTANT, because GCC-3.3 emitted a warning about
	__asm__ __const__.
2004-09-23 14:58:40 +00:00
Andrew V. Samoilov 15c6e5cae6 * direntry.c (vfs_s_readlink): Use g_strlcpy instead strncpy.
* ftpfs.c (ftpfs_get_reply): Use g_strlcpy instead strncpy.
* extfs.c (extfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* mcfs.c (mcfs_readlink): Fix return value. Use g_strlcpy
        instead strncpy.
* tar.c (tar_read_header): Add additional check for consistency.
        Fix memory leak.
* cpio.c (cpio_defer_find): Remove recursion.
        (cpio_free_archive): Fix memory leak.
        (cpio_read_bin_head): Use union for simplicity using of header
        structure. Add additional check for consistency.
        (cpio_read_oldc_head): Add additional check for consistency.
2004-09-02 00:09:02 +00:00
Roland Illig f608bd21f8 Renamed any variable stat into st. 2004-08-17 11:13:55 +00:00
Roland Illig 34a8088483 Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h). 2004-08-16 23:18:42 +00:00
Roland Illig a998d33f7c Made the implicit conversions explicit to prevent "hidden" bugs. 2004-08-16 04:26:46 +00:00
Pavel Roskin 6ffd35bf07 * gc.c: Eliminate all code for timestamping parent filesystems.
It's broken and undocumented.  Adjust all dependencies.
2003-11-26 21:10:42 +00:00
Pavel Roskin d2e2f5c544 * cpio.c (cpio_create_entry): Fix possible buffer underflow
and memory leak.
2003-11-12 17:10:48 +00:00
Pavel Roskin b33f2cbb47 * vfs.c: Split garbage collection code into ...
* gc.c: ... this.
* vfs.h: Corresponding code moved ...
* gc.h: ... here.
* Makefile.am: Adjustments for the above.
2003-11-07 23:43:55 +00:00
Pavel Roskin 8e3a0c9d65 * direntry.c (vfs_s_init_class): Improve interface to allow more
code reuse.  Change all callers.
(vfs_s_getlocalcopy): New implementation.  Don't use
mc_def_getlocalcopy().  Use vfs_s_open() to create local copy.
(vfs_s_ungetlocalcopy): New function.
* xdirentry.h: Add new field "flags" to struct vfs_s_subclass.
* extfs.c (extfs_ungetlocalcopy): Don't use
mc_def_ungetlocalcopy() in the dead branch.
* vfs.c (mc_def_getlocalcopy): Make static.
(mc_def_ungetlocalcopy): Likewise.
2003-10-28 07:09:39 +00:00
Pavel Roskin 7d16d65e35 * vfs.h: Constify some arguments for many functions.
* xdirentry.h: Likewise.  Adjust all dependencies.
2003-10-28 02:10:33 +00:00
Pavel Roskin 5bc20fd294 * *.c: Rename functions that don't have an a prefix indicating
what file they are defined in.  This simplifies debugging.
2003-10-28 00:57:02 +00:00
Pavel Roskin 4ee3f26133 * cpio.c (cpio_ungetlocalcopy): Remove.
* tar.c (tar_ungetlocalcopy): Likewise.
* vfs.c (mc_def_ungetlocalcopy): Add support for read-only
filesystems.
2003-10-27 21:01:00 +00:00
Pavel Roskin bc455d5840 * direntry.c (vfs_s_find_inode): Only allow search from root.
Change second argument to superblock to prevent abuse.
2003-10-27 03:09:40 +00:00
Pavel Roskin 511321bcfd * direntry.c (vfs_s_add_dots): Remove. Fix all callers.
(vfs_s_free_inode): Remove support for "." and ".." entries.
* ftpfs.c (dir_load): Likewise.
Support for "." and ".." entries was a hack that could make the
cache non-traversible from inodes to the root and cause infinite
loop in vfs_s_fullpath().
Reported by Frédéric L. W. Meunier <lists1@pervalidus.net>
2003-10-27 01:26:18 +00:00
Pavel Roskin 211ce16fac * wtools.c: Merge mc_message() and message() into one background
safe function message().  Fix all callers.
2003-10-26 04:47:20 +00:00
Pavel Roskin 50045218ab Remove unneeded includes in ../src 2003-10-25 21:34:57 +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 0b99804da2 * names.c: Merge ...
* utilvfs.c: ... here.
* names.h: Merge ...
* utilvfs.h: ... here.
* Makefile.am: Remove references to names.c and names.h.
2003-10-16 16:50:09 +00:00
Pavel Roskin 63740624ea * xdirentry.h: Rename vfs_s_data to vfs_s_subclass.
* cpio.c: Initialize only non-zero fields in vfs_s_subclass.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* tar.c: Likewise.
2003-10-16 16:40:11 +00:00
Pavel Roskin dcd2b9e8fc * xdirentry.h: Fix typos in field names. 2003-10-16 06:05:39 +00:00
Pavel Roskin a6754ce841 * xdirentry.h: Cleanup unused or write-only fields. Adjust all
dependencies.
2003-10-16 05:47:23 +00:00
Pavel Roskin 6cf97f4069 * xdirentry.h: Remove all typedefs, there is no need to hide the
fact that structures are structures.  Fix all dependencies.
2003-10-12 01:00:44 +00:00
Pavel Roskin 00b57fd4bf * vfs.h: Remove typedef vfs, it's too ambiguous. Massive
changes to use struct vfs_class instead.
2003-10-12 00:24:00 +00:00