Unused static function causes build to break on -Werror.
Fixing this by commenting it out.
(not removing it since it might get used some day)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
valgrind log snippet: (from here http://pavlinux.ru/vgmc.log)
> ==26750== HEAP SUMMARY:
> ==26750== in use at exit: 0 bytes in 0 blocks
> ==26750== ==26749== Invalid free() / delete / delete[]
> ==26749== at 0x4A06DD8: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==26749== by 0x48B5F9: edit_read_syntax_rules (syntax.c:766)
> ==26749== by 0x48CDA7: edit_read_syntax_file (syntax.c:1140)
> ==26749== by 0x48D06D: edit_load_syntax (syntax.c:1219)
> ==26749== by 0x4762F6: edit_init (edit.c:834)
> ==26749== by 0x4858FC: edit_file (editwidget.c:241)
> ==26749== by 0x44D017: do_edit_at_line (cmd.c:304)
> ==26749== by 0x44D098: do_edit (cmd.c:324)
> ==26749== by 0x44D10E: edit_cmd (cmd.c:331)
> ==26749== by 0x46C2E4: midnight_execute_cmd (main.c:1193)
> ==26749== by 0x46CD41: midnight_callback (main.c:1690)
> ==26749== by 0x4353F4: buttonbar_call (widget.c:2654)
> ==26749== Address 0x60f8e10 is 0 bytes inside a block of size 30 free'd
> ==26749== at 0x4A06DD8: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==26749== by 0x48B32C: open_include_file (syntax.c:705)
> ==26749== by 0x48B6E8: edit_read_syntax_rules (syntax.c:784)
> ==26749== by 0x48CDA7: edit_read_syntax_file (syntax.c:1140)
> ==26749== by 0x48D06D: edit_load_syntax (syntax.c:1219)
> ==26749== by 0x4762F6: edit_init (edit.c:834)
> ==26749== by 0x4858FC: edit_file (editwidget.c:241)
> ==26749== by 0x44D017: do_edit_at_line (cmd.c:304)
> ==26749== by 0x44D098: do_edit (cmd.c:324)
> ==26749== by 0x44D10E: edit_cmd (cmd.c:331)
> ==26749== by 0x46C2E4: midnight_execute_cmd (main.c:1193)
> ==26749== by 0x46CD41: midnight_callback (main.c:1690)
We see doublefree memory corruption here, introduced by spurious 'g_free(error_file_name)'
of changeset:0c17219b2ab5cb5fe2e73f8d7cc9c11c755a3ae4 (syntax.c file)
The rest of code seems to store real syntax file name there.
Making code the same as part above: don't free 'error_file_name'
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
* Bump epoch, because otherwise users wouldn't be able to upgrade
properly from older RPMs. The versioning scheme has to be revisited.
* Add changelog entry.
* Small corrections to the changelog.
During last major escape transition "foo" -> properly_escaped_foo we forgot
to add "'" to list of specialcased symbols. This leads to mc hangup when you
try to do something with files/dirs, containing that symbol.
Adding it!
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Add the user name to the ssh command line only if it's not the same as
the local logged-in user. OpenSSH will take it as a default value
anyway, but otherwise we'll override ~/.ssh/config settings which might
be not what the user wants.
* Factored out vfs_get_local_username()
* Moved default-user detection to fish subsystem (URL_USE_ANONYMOUS)
* Slight modifications to the comments and wording
Originally from: http://mail.gnome.org/archives/mc-devel/2005-April/msg00035.html
The routines `vfs_s_find_entry_linear()' and `vfs_s_find_entry_tree()'
call `canonicalize_pathname()' on entry. This routine eats `..' path
components in certain cases. In case of ftpfs this is not desired -
the path should be kept as is since the code in direntry.c doesn't have
enough knowledge of the directory structure on the remote end.
Assume that
there is a path like this on the remote server
/path1/path2/path3
The `path2' component is a symlink to some directory and `path3' is a
symlink stored in `path2' which is relative to `path2' i.e.
path2
path3 -> ../some/other/path
Now, the code in direntry.c will determine that `path3' is a symlink and
will try to resolve (vfs_s_resolve_symlink) it by passing the following path
/path1/path2/../some/other/path
to `vfs_s_find_entry_linear' . As I've said above this routine calls
`canonicalize_pathname' on entry which will modify the path like this:
/path1/some/other/path
Now this is clearly wrong since `path2' is a symlink and it should be
resolved first. In the case of ftpfs the code in direntry.c doesn't have
enough knowledge about physycal directory layout on the remote filesystem
so it shouldn't try to canonicalize the path. The path should be left as
is and passed to the remote end for processing.
Fix issue:
Changed function canonicalize_pathname (as fact, renamed to custom_canonicalize_pathname)
In this function added ability to partial canonicalize of pathname.
And some functions from vfs/direntry.c calls custom_canonicalize_pathname without
removal of '..' stuff.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Set of patches that correct minor mistakes and mistypes in the man files
from Denis Briand. Thanks!
Fixes suggested by Slava Zanko and Andrew Borodin: always use
@sysconfdir@/mc instead of hardcoded /etc/mc for configuration pathes in
mans.
Ctrl-g instead of Ctrl-c is used now to generate SIGINT signal.
SIGINT signal generating for MC/NCurses library is enabled now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added option 'auto_save_setup_panels' into [Midnight-Commander] section of ini-file.
If no specified, value of this option is equal to value of 'auto_save_setup' option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
The 0xff character is valid character in CP1251 codepage,
therefore the proper unsigned extension of char to int
is required in stuff() function to avoid the 0xff as -1
interpretation in handle_char() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Ther eare 7 untranslated items, they need to be looked after some other time.
Some bugs were fixed and many strings were translated. Please update.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
viewer hangup after search in archive
Test case:
* download ftp://ftp.slackware-brasil.com.br/slackware-12.0/testing/MANIFEST.bz2 or any slackware MANIFEST.bz2 from internet
* F3 under MANIFEST.bz2
* F7 "fortunes-o.tar.gz"<enter>
* hangup
Fix issue:
* Change growbuff from owm implementation into g_ptr_array
* Fixed calculating of search_start position
* Search module: fixed checking for return code from update callback
* Search module: Added return code MC_SEARCH_CB_OK for search callbacks
* Added exit on keyboard break
* Fixed search in last grow'ed block
Signed-off-by: Slava Zanko <slavazanko@gmail.com>