Commit Graph

1347 Commits

Author SHA1 Message Date
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
Sergei Trofimovich
3da14e7f8f Merge branch 'mc-4.6'
* mc-4.6:
  fish: chgrp: trac:#336; do not add exceeding quotes (fixed by snizovtsev)
2009-05-02 16:01:13 +03:00
Sergei Trofimovich
027168ce3d fish: chgrp: trac:#336; do not add exceeding quotes (fixed by snizovtsev)
As we pass  correctly(hopefully) escaped file names - all calls
(except forgotten chgrp) were converted to accept unquoted strings.

This patch fixes chgrp.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-05-02 14:09:07 +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
Sergei Trofimovich
0d281515a6 warnings fix: sanitized 'write'alike callback prototype (int retval -> ssize_t)
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-04-23 22:20:34 +03:00
Sergei Trofimovich
27fbf91c28 vfs/vfs.c: valgrind: fixed read-of-unallocated memory
Comment snippet:
    We can't just allocate struct dirent as (see man dirent.h)
    struct dirent has VERY nonnaive semantics of allocating
    d_name in it. Moreover, linux's glibc-2.9 allocates dirents _less_,
    than 'sizeof (struct dirent)' making full bitwise (sizeof dirent) copy
    heap corrupter. So, allocate longliving dirent with at least
    (NAME_MAX + 1) for d_name in it.
    Strictly saying resulting dirent is unusable as we don't adjust internal
    structures, holding dirent size. But we don't use it in libc infrastructure.
    TODO: to make simpler homemade dirent-alike structure.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-04-22 22:15:51 +03:00
Andrew Borodin
dc8150a521 src/strutil.h: created estr_t type for result of charset convertion functions.
Modified descriptions.

src/strutil.c (_str_convert): return value of estr_t type instead of int.
Check coder first. Removed redundant code.
(str_convert): simplified. Changed returned type to estr_t.
(str_nconvet): likewise.
(str_vfs_convert_to): likewise.
(str_vfs_convert_from): likewise. Used symbolic names instead of hardcoded values.
(str_translate_char): likewise.

src/strutil8bit.c (str_8bit_vfs_convert_to): likewise. Made function static.

src/strutilascii.c (str_ascii_vfs_convert_to): likewise.

src/strutilutf8.c: (str_utf8_vfs_convert_to): Used symbolic names
instead of hardcoded values.

src/charsets.c (convert_from_utf_to_current): likewise.
(convert_from_utf_to_current_c): likewise.
(convert_from_8bit_to_utf_c): likewise.
(convert_from_8bit_to_utf_c2): likewise.

src/view.c (view_get_char): likewise.

vfs/vfs.c (_vfs_translate_path): Changed returned type to estr_t.
Used symbolic names instead of hardcoded values.
(vfs_translate_path): likewise.
2009-04-22 20:35:32 +04:00
Slava Zanko
df3926d1c4 Fix show directory and file names in other that system encoding symbolsets (with error of recoding).
Old behaviour: enrties not show, new behaviour: entries show, but marked as broken files if
recoding impossible
2009-04-20 13:09:59 +03:00
Sergei Trofimovich
e88a6bd4d8 vfs/vfs.c: build fix: iconv_t(-1) -> INVALID_CONV
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-04-19 22:11:49 +03:00
Mikhail S. Pobolovets
121e910351 Merge branch '191_extfs_unrar' 2009-04-16 22:50:03 +03:00
Mikhail S. Pobolovets
07584c35c7 Merge branch '190_srpm_support' 2009-04-16 22:31:48 +03:00
Mikhail S. Pobolovets
e0831ebd2e * vfs/extfs/urar.in: If unrar is not aviable then use rar instead
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-04-16 20:41:25 +03:00
Slava Zanko
ac8ae55181 Fix conflicts after rebasing 2009-04-16 13:24:47 +03:00
Slava Zanko
6ecea97973 vfs/vfs.c: Replace str_conv_t to GIConv 2009-04-16 13:14:29 +03:00
Slava Zanko
2ac6b553c6 Rework strutils for usage GString
instread of self-made buffers.
2009-04-16 13:13:58 +03:00
Mikhail S. Pobolovets
1959b42fdc Merge branch '252_doxygen_desc_src'
Conflicts:

	src/file.h

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-04-16 08:26:52 +03:00
Slava Zanko
f9ab791ac8 vfs/vfs.c: Replace str_conv_t to GIConv 2009-04-15 17:11:00 +03:00
Slava Zanko
dbf8dd1bc2 Rework strutils for usage GString instread of self-made buffers. 2009-04-14 13:29:01 +03:00
Ilia Maslakov
3b5e2c052f Merge branch 'utf-8' into master
resolve conflicts:
	configure.ac
	src/complete.c
	src/file.c
	src/layout.c
	src/main.c
	src/menu.c
	src/screen.c
	src/util.c
	src/widget.c
	src/widget.h
2009-04-04 19:50:46 +00:00
Sergei Trofimovich
e2f1b4991e Merge branch 'mc-4.6'
* mc-4.6:
  added fix by cppgx (#84)
2009-02-23 22:17:17 +02:00
Enrico Weigelt, metux IT service
2d3da8a99c added fix by cppgx (#84) 2009-02-23 20:55:42 +02:00
Mikhail S. Pobolovets
70e800fc58 mandriva: Srpm support for extfs
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-21 13:28:40 +02:00
Mikhail S. Pobolovets
da3b76b8d7 Merge branch '176_lzma' 2009-02-21 12:23:50 +02:00
Sergei Trofimovich
15c9878d15 Merge branch 'mc-4.6'
* mc-4.6:
  backport: lt.po: update by stikonas (#274)
  backport: nl.po: update by mpol (#271)
  fixed mismerge: completion stuff
  mismerge fix: g_concat -> g_strconcat
  header guard fix
  Remove some of the SHELL_ESCAPE_STR Stuff...
  Revert "introduced new type SHELL_ESCAPED_STR for more type safety"
  Last bunch of reverts and removal of mhl/*
  fixed canonicalize_pathname() breakage: fixed str_move() function (memmove semantics) again
  Revert some functions (mhl_mem_free to g_free, etc)
  Revert "replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()"
  Revert "mhl: mhl_shell_unescape_buf(): fixed memory array OOB."
  Revert "build fix: added missing declaration of mhl_dir_plus_file (reported by andrew_b)"
  Revert "cleanup: mhl_str_dir_plus_file(): int -> size_t (suggested by Andrew Borodin)"
  Revert "fixed #240"
  Revert "Fixing a theoretical buffer overflow which was reported by Roland Illig"
  Revert "Call va_end after the iteration as we need to free the list again."
  Revert "Added enhancements from Sergei which he attached to #241."
  Revert "Resolve some issues in mhl Rollang Illig pointed us to:"

Conflicts:
	ChangeLog
	edit/edit.c
	edit/editcmd.c
	edit/editwidget.c
	edit/syntax.c
	src/command.c
	src/complete.c
	src/ext.c
	src/find.c
	src/screen.c
	src/util.c
	src/widget.c
	vfs/extfs.c
	vfs/fish.c
2009-02-20 12:35:20 +02: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
Patrick Winnertz
0b0f8e6128 Revert "introduced new type SHELL_ESCAPED_STR for more type safety"
This reverts commit 90763ba82f.

Conflicts:

	ChangeLog
	mhl/escape.h
	src/complete.c
	vfs/fish.c

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-10 15:08:01 +01:00
Patrick Winnertz
8b7e47d9cc Last bunch of reverts and removal of mhl/*
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-10 14:11:41 +01:00
Patrick Winnertz
f237a14635 Revert some functions (mhl_mem_free to g_free, etc)
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-10 13:52:53 +01:00
Patrick Winnertz
e4e135399f Revert "replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()"
This reverts commit 54d6ec88dc.

Conflicts:

	ChangeLog
	mhl/string.h
	src/command.c
	src/complete.c
	src/util.c
2009-02-10 13:29:18 +01:00
Patrick Winnertz
1f656eb6be Revert "build fix: added missing declaration of mhl_dir_plus_file (reported by andrew_b)"
This reverts commit c697fb3753.
2009-02-10 13:24:32 +01:00
Patrick Winnertz
8a55cb1e9a Removed three more includes of mhl files in smbfs.c
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-08 12:41:44 +01: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
3b8f37b99e Moved some functions out of mhl into src/util.c
This commit moves the mhl_str_concat_dir_and_file back into src/util.c whitout changing atm the functionality.

Please note that this is an incomplete fix and needs to be partially enhanced in order to keep the full functionality with glib.

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 11:17:03 +01:00
Patrick Winnertz
d8aa8a3028 Forgot to remove some more .s strings and do a rename in order to prevent compiler warnings + added include
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 00:36:30 +01:00
Patrick Winnertz
0450daf566 Removed type SHELL_ESCAPED_STR in favour of plain char*
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 00:20:19 +01:00
Patrick Winnertz
589ffd0b10 Use g_snprintf instead of snprintf as we switch back to glib
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:49:00 +01:00
Patrick Winnertz
ae987b923e Reverted the use of bool in favour of gboolean
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:46:07 +01: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
Patrick Winnertz
5920d13810 First bunch of reverting stuff from mhl to switch back to glib
This removes the usage of stdbool.h in favour of mhl/tyes.h as we have to revert everything one by one

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:09:37 +01:00
Enrico Weigelt, metux IT service
a5ba278729 merged in lzma patch from mandriva 2009-02-04 21:16:00 +01:00
Enrico Weigelt, metux IT service
648a377ad8 merged mc-4.6 2009-02-04 04:11:17 +01:00
Enrico Weigelt, metux IT service
5f84762472 extfs/rpm,extfs/trpm: removed obsolete rpm tags 2009-02-04 04:09:30 +01:00
Enrico Weigelt, metux IT service
584caa7949 manually merged mc-4.6 2009-02-04 01:26:28 +01:00
Enrico Weigelt, metux IT service
adbe38172d added patch from #194 2009-02-04 01:18:51 +01:00
Enrico Weigelt, metux IT service
0c97636212 fixed #240 2009-02-04 01:11:56 +01:00
Enrico Weigelt, metux IT service
f2a745a47d merged #242 2009-02-04 00:47:29 +01:00
Enrico Weigelt, metux IT service
d4927f99ef Merge commit 'origin/201_historic_compressors' 2009-02-04 00:41:30 +01:00
Enrico Weigelt, metux IT service
463a18623d removed obsolete own memmove implementation (#242) 2009-02-03 19:51:01 +01:00
Enrico Weigelt, metux IT service
8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00