Commit Graph

13515 Commits

Author SHA1 Message Date
Andreas Mohr
0535ddddcc lib/search/lib.c: cleanup -Wcast-qual warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:43 +03:00
Andreas Mohr
97e370e396 lib/mcconfig/paths.c: cleanup -Wcast-qual warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
2016-04-16 10:23:43 +03:00
Andreas Mohr
16f229114a Ticket #3598: cleanup some -Wcast-qual compiler warnings.
Introduce CONST_WIDGET helper and use it.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:43 +03:00
Andrew Borodin
51d0783bf9 Merge branch '3571_high_level_mouse_api'
* 3571_high_level_mouse_api: (28 commits)
  Rename mouse.was_drag to mouse.last_msg.
  Drop old mouse API and use the new one.
  Fix menu handling.
  Optimize menu activation.
  mcedit: rename MCEDIT_DRAG_NORMAL to MCEDIT_DRAG_NONE.
  mcedit: use the new mouse API.
  WEdit: get rid of mouse event pump.
  WEdit: use the new mouse API.
  Help: use the new mouse API.
  Viewer: use the new mouse API.
  Diff viewer: usethe new mouse API.
  WTree: use the new mouse API.
  (panel_mouse_callback): minor optimization.
  WPanel: use the new mouse API.
  WMenuBar: execute menu item after drag action.
  WMenuBar: a few mouse handling fixes.
  WMenuBar: use the new mouse API.
  WRadio: use the new mouse API.
  WInput: use the new mouse API.
  WCheck: use the new mouse API.
  ...
2016-04-11 09:50:39 +03:00
Mooffie
438e841226 Rename mouse.was_drag to mouse.last_msg.
Get rid of the 'click' variable.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
8490ca7be4 Drop old mouse API and use the new one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Mooffie
781b810c13 Fix menu handling.
We now send mouse events to widgets in reverse Z-order, as done in common GUIs.
This makes it easy to implement "invisible" menubars correctly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
c9a437a9c2 Optimize menu activation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
1adc6a53d1 mcedit: rename MCEDIT_DRAG_NORMAL to MCEDIT_DRAG_NONE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
46963b3e71 mcedit: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Mooffie
be00764bc8 WEdit: get rid of mouse event pump.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
c86e45e482 WEdit: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
2cf4c11aa8 Help: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
f926b25fe5 Viewer: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
4317ceaf84 Diff viewer: usethe new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
4b420aa85c WTree: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
5debec4917 (panel_mouse_callback): minor optimization. 2016-04-01 14:16:08 +03:00
Andrew Borodin
54456a678f WPanel: use the new mouse API. 2016-04-01 14:16:08 +03:00
Andrew Borodin
fa4e69b3b4 WMenuBar: execute menu item after drag action.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
cae293b4d7 WMenuBar: a few mouse handling fixes. 2016-04-01 14:16:08 +03:00
Andrew Borodin
d974021678 WMenuBar: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
e8c6608fa5 WRadio: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
ebac1745bc WInput: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
30a56a9793 WCheck: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
23d5dbdf94 WButtonBar: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
1401f751cb WListbox: optimize mouse event processing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
70184b8a2d WListbox: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
c678b58e23 WButton: use the new mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
192f01ebd2 Refactoring of high-level mouse API.
Decompose mouse event translation function: move mouse event handling
to separate function. This decomposition can be used for low-level
processing of high-level mouse events.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
b305deba64 Don't generate click event after drag action.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
cfd2c35241 (easy_mouse_translator): minor optimization. 2016-04-01 14:16:08 +03:00
Mooffie
03daa62e19 Ticket #3571: high-level mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
50cca69522 Merge branch '3621_cpio_segfault'
* 3621_cpio_segfault:
  mc.ext: add View action for initrd.
  mc.ext: fix regular expression for initrd.
  Ticket #3621: fix segfault when enter in some cpio archives.
2016-03-28 09:06:09 +03:00
Andrew Borodin
438f1498b3 mc.ext: add View action for initrd.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-28 09:05:29 +03:00
Sergey Y. Afonin
0cb1a3c9f3 mc.ext: fix regular expression for initrd.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-28 09:05:29 +03:00
Andrew Borodin
a056be3dc3 Ticket #3621: fix segfault when enter in some cpio archives.
(cpio_create_entry): fix NULL dereference (i. e. in case of stale link).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-28 09:05:29 +03:00
Andrew Borodin
990f6f1a8b Merge branch '3617_freebsd_crash'
* 3617_freebsd_crash:
  Ticket #3617: (mc_open): handle varargs mode_t promotion issue.
2016-03-28 08:59:54 +03:00
Mooffie
0e89375772 Ticket #3617: (mc_open): handle varargs mode_t promotion issue.
On systems where 'mode_t' is smaller than 'int', doing 'va_arg (ap, mode_t)' is
wrong because of C's "default argument promotions". GCC 4 creates crashing code
in this case.

The "va_arg" page of Gnulib's manual describes the problem and a simple solution:

    https://www.gnu.org/software/gnulib/manual/html_node/va_005farg.html

However, since that solution reportedly (see thread at next link) still causes
GCC to print warnings (for no good reason; perhaps this was fixed in newer
GCCs), we pick a solution that defines a PROMOTED_MODE_T at the configuration
stage:

    https://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00231.html

(We take our 'mode_t.m4' from the most recent Gnulib source.)

(If any of the URLs above no longer works, simply search the web for the
mentioned words.)
2016-03-28 08:59:14 +03:00
Denis Briand
2a4614c535 doc/man/mc.1.in: spelling error - s/interpeted/interpreted/
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-25 18:14:51 +01:00
Andrew Borodin
d6f031738c Merge branch '3605_extfs_buffer_overflow'
* 3605_extfs_buffer_overflow:
  Ticket #3605: extfs: fix buffer overflow.
2016-03-20 11:55:38 +03:00
Andreas Mohr
e1ad66e90e Ticket #3605: extfs: fix buffer overflow.
When handling with copy/move commands inside of archive we can lead into buffer overflow
steps to roproduce:
    create simple 7z archive
    open it
    rename single filename
    hit buffer overflow

found by clang/AddressSanitizer

==17794==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000273593 at pc 0x00000045f2a9 bp 0x7ffc94aa8e20 sp 0x7ffc94aa85d0
READ of size 2 at 0x602000273593 thread T0
    #0 0x45f2a8 in __interceptor_strchr.part.44 (/usr/bin/mc+0x45f2a8)
    #1 0x70fb72 in extfs_find_entry_int /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:312:13
    #2 0x70f562 in extfs_find_entry /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:331:11
    #3 0x712131 in extfs_internal_stat /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:1117:13
    #4 0x7f3de308ab59 in mc_stat /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/interface.c:556:46
    #5 0x538575 in file_mask_dialog /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/filegui.c:1340:25
    #6 0x6e0753 in panel_operate /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/file.c:2718:13
    #7 0x6bdabd in rename_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:811:9
    #8 0x551ef4 in midnight_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1307:9
    #9 0x7f3de30a49e7 in buttonbar_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/buttonbar.c:172:42
    #10 0x7f3de30b2305 in dlg_try_hotkey /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:464:23
    #11 0x7f3de30b199a in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:509:19
    #12 0x7f3de30b2ef9 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
    #13 0x7f3de30b2af5 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
    #14 0x5507bb in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1827:9
    #15 0x50b874 in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:403:21
    #16 0x7f3de1ec78fb in __libc_start_main (/lib64/libc.so.6+0x208fb)
    #17 0x427f48 in _start (/usr/bin/mc+0x427f48)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-20 11:54:52 +03:00
Andrew Borodin
787cea240f Merge branch '3606_shell_segfault'
* 3606_shell_segfault:
  (mc_shell_recognize_path): clarify duplicate comments
  Ticket #3606: fix segfault due to incorrect value of SHELL environment variable.
2016-03-17 09:24:45 +03:00
Yury V. Zaytsev
3b9087e8a3 (mc_shell_recognize_path): clarify duplicate comments
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-17 09:24:11 +03:00
Andrew Borodin
83b02196c8 Ticket #3606: fix segfault due to incorrect value of SHELL environment variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-17 09:24:11 +03:00
serpiph
b678d3b2fd Ticket #3618: update f90 syntax. 2016-03-16 09:36:26 +03:00
Andrew Borodin
b9810b5ba5 Merge branch '3620_patchfs_syntax_error'
* 3620_patchfs_syntax_error:
  Ticket #3620: patchfs: fix syntax error.
2016-03-16 09:24:25 +03:00
zazaho
48cfd3b28d Ticket #3620: patchfs: fix syntax error.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-16 09:23:34 +03:00
Yury V. Zaytsev
4e71328d7b Updated doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-12 17:20:56 +01:00
Yury V. Zaytsev
e52726963a Updated the hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-12 17:07:07 +01:00
Yury V. Zaytsev
eae2a2542e Updated translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-12 16:59:28 +01:00