1
1
Граф коммитов

12553 Коммитов

Автор SHA1 Сообщение Дата
Andrew Borodin
d119439a1c (mc_search__conditions_free): use g_ptr_array_foreach().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
00f6272364 (mc_search__cond_struct_new_regex_hex_add): refactoring to get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb2f5d35f3 (mc_search__run_regex): optimization
...for case where there is no MC_SEARCH_CB_INVALID or MC_SEARCH_CB_SKIP
return codes (for search from file manager), so we can copy line
at regex buffer all at once.

Thanks Sergey Naumov <sknaumov@gmail.com> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
9ea1ed08c6 mcedit: file loading speed up.
Apply direct line counting during file reading.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
13c8f5213b (load_panelize): replace while() by for() and fix potential memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb142bf47f (lookup_key): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
546e89f611 (vfs_path_tokens_get): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
f3bdcb186b (mc_skin_colors_old_configure_one): cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
9232bcb093 (edit_load_macro_cmd): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
26fbddf6f4 (vfs_path_tokens_count): refactoring: get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Marco Atzeri
87a5f11452 Ticket #3053: src/filemanager/filegui.c: fix preprocessor condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Dmitry Smirnov
69de5b830f Ticket #3051: prepare to 4.8.11 release.
Ticket #3052: fix man page "macro `\' not defined" warnings.

man --warnings doc/man/mc.1 >/dev/null

reported the following warning:

3114: warning: macro `\' not defined".

and indeed man page didn't look correct at the line starting with "Apply
escaping".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
80c2318890 Merge branch '2978_tmux_keys'
* 2978_tmux_keys:
  Ticket #2978: fix for Home, End, Shift+Fn problems under screen/tmux.
2013-10-03 15:45:36 +04:00
Sergey Naumov
1f05e56b5c Ticket #2978: fix for Home, End, Shift+Fn problems under screen/tmux.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 15:45:16 +04:00
Andrew Borodin
466e5bc4c5 Merge branch '1588_rpm_enhancement'
* 1588_rpm_enhancement:
  Ticket #1588: rpm extfs enhancements:
2013-10-03 12:45:50 +04:00
Andrew Borodin
33896c610b Ticket #1588: rpm extfs enhancements:
* Improve support for EPOCH
  * Add support for PREINPROG/POSTINPROG/PREUNPROG/POSTUNPROG
  * Add support for VERIFYSCRIPTPROG
  * Add support for TRIGGERSCRIPTS/TRIGGERSCRIPTPROG

Thanks Arkadiusz Miśkiewicz <arekm@maven.pl> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 12:43:00 +04:00
Slava Zanko
836cff5863 Fix indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-10-03 10:57:03 +03:00
Andrew Borodin
c55b4808f6 Merge branch '2661_mcedit_paste'
* 2661_mcedit_paste:
  Handle newline and tab with shift/ctrl modifiers correctly.
  Support bracketed paste mode of xterm in mcedit.
  Ticket #2661: support enable bracketed paste of xterm.
2013-10-03 11:42:07 +04:00
Egmont Koblinger
930f683019 Handle newline and tab with shift/ctrl modifiers correctly.
MC already has its own half-ready trick: when pasting with Shift-Insert,
using the X11 extension, the newline ("Enter" as mc calls it) with the
Shift modifier pressed gets converted to a "Return", and in the editor
the Return character inserts a non-indenting newline. This makes pasting
better in terminals not supporting bracketed paste, however, it has some
problems that this commit addresses:

  * Shift+newline gets this special treatment, but Ctrl+newline gets
    dropped. Hence e.g. when pasting in Gnome-terminal with Ctrl+Shift+V
    all the newlines will be missing. This commit adds the same
    non-indenting newline behavior to Ctrl+Newline and Ctrl+Shift+Newline.

  * The code forgets about Tab that also needs special treatment:

    - Most terminals send \e[Z on Shift+Tab, this is not handled by MC
      at all, moreover it causes a hang for about a second. This commit
      teaches this sequence to MC. This is especially useful when no X11
      is available, because there Ctrl+Tab is identical to Tab, so the
      backwards tab feature is not available. With this commit Shift+Tab
      becomes a backwards tab too on all terminals that emit \e[Z.

    - When pasting to the editor, Shift+Tab, Ctrl+Tab and Ctrl+Shift+Tab
      should all insert a tab for the same reason mentioned at the newline.

    - It would look inconsistent in the keymap files to have logical code
      such as "backtab" instead of "shift-tab" and friends, hence get rid
      of KEY_BTAB and use KEY_M_SHIFT | '\t' instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Egmont Koblinger
5b47861101 Support bracketed paste mode of xterm in mcedit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Egmont Koblinger
8f35c90b94 Ticket #2661: support enable bracketed paste of xterm.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Andrew Borodin
d87bef778b Merge branch '3073_urar5_spaces'
* 3073_urar5_spaces:
  Ticket #3073: urar helper: fix handling filenames with spaces for unrar v5.
2013-10-01 16:35:01 +04:00
Oleksandr Natalenko
c4a546ac01 Ticket #3073: urar helper: fix handling filenames with spaces for unrar v5.
Extfs urar helper doesn't allow to see the whole filename if it
contains spaces and is unpacked by unrar v5. This commit should fix that.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-24 11:46:00 +04:00
Andrew Borodin
931efb4d34 Merge branch '3070_zip_save_changes'
* 3070_zip_save_changes:
  Ticket #3070: changes to files in nested .zip archives are lost.
2013-09-23 10:43:57 +04:00
Andrew Borodin
1988ce2759 Ticket #3070: changes to files in nested .zip archives are lost.
How to reproduce:

Changes to the text file inside nested .zip file are lost.

echo "hello, world" >hello.txt
zip message.zip hello.txt
zip wrapper.zip message.zip
rm -v hello.txt message.zip

Using mc enter to wrapper.zip/message.zip and edit (F4) "hello.txt",
save, then exit mc.

unzip wrapper.zip
unzip message.zip

Result: changes were not saved to "hello.txt".
Expected result: changes are saved.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-23 10:43:13 +04:00
Andrew Borodin
852b885796 Merge branch '3069_case_sens_search_fix'
* 3069_case_sens_search_fix:
  Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
  Search: better support of --disable-charset
  Ticket 3069: fix of case-sensitive search
2013-09-21 13:49:10 +04:00
Slava Zanko
0b0f7e3975 Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-21 13:35:59 +04:00
Andrew Borodin
941a1eac1d Search: better support of --disable-charset
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-21 13:35:56 +04:00
Andrew Borodin
66da276200 Ticket 3069: fix of case-sensitive search
...if file encoding and locale are different.

Example: locale is KOI8-R, file encoding is UTF-8. Note: those encodings
are not same.

File content is following (in Russian):

йцукен
Йцукен

The difference is in first line char only: Й (lowercase letter) and й
(uppercase letter).  The search of Ê gives the result Й independently of
case sensitivity. й isn't found.
If switch "All charsets" on, nothing is found.

The main idea of fix is modification of search API to allow set of search
pattern charset and use if within search engine.
Old API:
mc_search_new (pattern, pattern_len);
New API:
mc_search_new (pattern, pattern_len, pattern_charset);

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-21 13:35:31 +04:00
Andrew Borodin
cc980f3c50 Merge branch '3066_dir_list'
* 3066_dir_list:
  Rename type file_entry to the file_entry_t.
  Concretize an usage of file_entry type.
  Rename functions:
  Rename macros related to dir_list::size.
  (dir_list_append): add new dir_list API and use it.
  (clean_dir): try minimize memory usage.
  Add dir_list::len member to keep number of items in list.
  (handle_path): don't check list size here.
  (dir_list_grow): new public API of dir_list.
  Rename panel_sort_info_t to dir_sort_options_t
  Move sort_field member out from panel_sort_info_t structure.
  Ticket #3066: refactoring of dir_list class and related code.
2013-09-19 16:23:53 +04:00
Slava Zanko
8a28d3bac4 Rename type file_entry to the file_entry_t.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Slava Zanko
ba0808aae4 Concretize an usage of file_entry type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Andrew Borodin
92cdd89887 Rename functions:
set_zero_dir -> dir_list_init
clean_dir -> dir_list_clean
do_sort -> dir_list_sort
do_load_dir -> dir_list_load
do_reload_dir -> dir_list_reload
get_dotdot_dir_stat -> dir_get_dotdot_stat

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
3470695357 Rename macros related to dir_list::size.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
6b31f67f31 (dir_list_append): add new dir_list API and use it.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
6aa9503f2f (clean_dir): try minimize memory usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
30cc6c6a29 Add dir_list::len member to keep number of items in list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
a774019250 (handle_path): don't check list size here.
(handle_dirent): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
6a3943fcf0 (dir_list_grow): new public API of dir_list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
e6bb69a0d9 Rename panel_sort_info_t to dir_sort_options_t
...and use it in routines of load and sort directory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
72ad268a9c Move sort_field member out from panel_sort_info_t structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
d8d1f90082 Ticket #3066: refactoring of dir_list class and related code.
Initial commit: use GCompareFunc instead of sortfn.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
a339ad354b Merge branch '2075_move_compute_total'
* 2075_move_compute_total:
  Ticket #2075: apply "Compute totals" option to Move operation.
2013-09-19 15:34:47 +04:00
Andrew Borodin
54a5139eec Ticket #2075: apply "Compute totals" option to Move operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 15:05:48 +04:00
Andrew Borodin
d6cd226c44 Merge branch '3064_crash_rpm_with_tar'
* 3064_crash_rpm_with_tar:
  Support tar payload of rpm.
  Ticket #3064: crash in case of incorrect cpio content within rpm.
2013-09-14 10:25:02 +04:00
Denis Silakov
53dce22933 Support tar payload of rpm.
mc always expects to see cpio payload inside rpm packages. However, it
is also possible for rpm packages to contain tar payload (ustar, to be
more precise).

rpm2cpio works correctly for such files (but it produces tar archives,
not cpio ones).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-14 10:24:53 +04:00
Andrew Borodin
20f8f204c8 Ticket #3064: crash in case of incorrect cpio content within rpm.
(cpio_open_archive): handle error of cpio header reading.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-14 10:24:29 +04:00
Andrew Borodin
5b1350c254 Merge branch '3047_panel_dir_fix'
* 3047_panel_dir_fix:
  Ticket #3047: fix mc arguments handling.
2013-09-13 18:04:37 +04:00
Andrew Borodin
446748619b Ticket #3047: fix mc arguments handling.
Following cases from command line are possible:
  * 'mc' (no arguments):
     active panel uses current directory
     passive panel uses "other_dir" from panels.ini
  * 'mc dir1 dir2' (two arguments):
     active panel uses dir1
     right panel uses dir2
  * 'mc dir1' (single argument):
     active panel uses dir1
     passive panel uses "other_dir" from panels.ini

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-13 18:00:50 +04:00
Andrew Borodin
e23239bf66 Merge branch '2271_confirmation_dialog_i18n'
* 2271_confirmation_dialog_i18n:
  Ticket #2271: fix i18n in Confirmation dialog.
2013-09-12 18:19:46 +04:00