Commit Graph

5108 Commits

Author SHA1 Message Date
Andrew Borodin
c3db552bfc (find_file): minor optimization of memory free.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-08-14 20:54:49 +03:00
Andrew Borodin
677b5c4f40 Ticket #3475: (find_file): fix memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-08-14 20:54:49 +03:00
Andrew Borodin
b918ff1499 (panel_save_setup): fix comparison between signed and unsigned.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 18:39:45 +03:00
Andrew Borodin
df5e689bba (parse_mc_v_argument): fix unused parameter 'value'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 18:34:43 +03:00
Andrew Borodin
25968f0931 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 18:28:23 +03:00
Andrew Borodin
edcae9673b (panel_listing_box): fix comparison between signed and unsigned.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 18:03:56 +03:00
Andreas Mohr
f023a83502 Ticket #3467: add -Wunreachable-code option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:19 +03:00
Andreas Mohr
dd8521b92d Ticket #3466: add -Wpointer-arith option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
f1b73ffe6e Ticket #3465: add -Wmissing-variable-declarations option...
...and fix relative warnings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
156bf097e2 Ticket #3464: (compute_namelen): remove...
...since DIRENT_LENGTH_COMPUTED is always 1.
compute_namelen() returns without functional logic.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
d2713adbc6 Ticket #3463: enable -Wbad-function-cast option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
3ba8109fe9 (mc_setup_by_args): refactoring of arguments handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
8566e10032 Ticket #3461: (panel_operate): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
f379339002 Ticket #3460: (do_enter_on_file_entry): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
216067a43c Ticket #3459: (edit_clean): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
290978e536 Ticket #3458: (dir_list_reload): fix memory leak.
Handling dir_copy list as full copy for avoid double free situations.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
a33d470e08 Set number of brief columns in the "Listing mode" dialog box.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
57e7e8f112 Save/load brief columns to/from panels.ini.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
fb474bc1c1 WPanel: support up to 9 columns in brief mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
b671a11388 Refactoring: use panel_lines() function instead of llines macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
3f968a50e0 (format_file): fix potential out-of-range and NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
8b5f618303 Minor refactoring of file panel draw.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Andrew Borodin
902246e4b8 Ticket #3212: support more than 2 columns in the file panel.
Initial commit: minor cleanup, refactoring and type accuracy in listing
format related code.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:51:39 +03:00
Dmitry Koterov
e09d64179e Ticket #3470: VFS s3+ bugfixes & improvements.
* Resolve "Please use  AWS4-HMAC-SHA256" error: enforce the new V4 authentication
method. It is required in many (if not all) locations nowadays.
* Now s3+ works with buckets in different regions: locations are auto-detected.
* Debug level specification support (MCVFS_EXTFS_S3_DEBUGLEVEL).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:42:06 +03:00
Andrew Borodin
17bbeb9791 Ticket #3456: SFTP VFS: fix segfault.
(mc_error_message): return error code for possible following use."
(sftpfs_cb_open_connection): fix dereference of null pointer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-09 16:46:45 +03:00
Andrew Borodin
549661e50b src/diffviewer/ydiff.c: fix use of HAVE_CHARSET.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 20:25:34 +03:00
Andrew Borodin
6ab4643088 src/filemanager/filegui.c: fix use of STAT_STATVFS and STAT_STATVFS64.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 20:20:14 +03:00
Andrew Borodin
2789e6e390 Ticket #3431: add missing default cases.
Introduce -Wswitch-default check.

Some minor cosmetics.

Thanks Andreas Mohr <and at gmx dot li> for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Andreas Mohr
39fec422c2 Ticket #3440: (find_file): fix memory leak.
Find_parameter() allocate start_dir but object will never freed.

Testcase: search file.

(Found by LeakSanitizer.)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
9fa3138377 Ticket #3439: (dir_list_reload): fix memory leak.
When dir_copy filling with fentry objects, dir_list_clean() on dir_copy
will never work because dir_copy->len is still zero.

Testcase: switch panels on/off.

(Found by LeakSanitizer.)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
67408e5f24 Ticket #3438: (dir_list_load): fix memory leak.
When root directory found list->len is decrease but listobj->fname
object will never be freed.
Clear list instead of resetting list len only.

(Found by LeakSanitizer.)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
c9b07317c3 (edit_find_line): use labs() instead of abs() for argument of type 'long'.
(edit_block_copy_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
036499523f (progress_update_one): fix variable initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
b698b7e834 Ticket #3435: clang compiler fixes/cleanups.
Since O_* macros are used in lib/global.h, include <fcntl.h> there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
e3a3424c28 Use #ifdef for autoconf provided marcos (continue).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
57452f656b Use #ifdef for autoconf provided marcos...
...until autoconf switch from un/define marco logic to always existing
macro with 0/1 value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
1a5015aa87 Ticket #3429: fix -Wstrict-prototypes compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
44bf7e8d80 reset_hp_softkeys variable is used in S-Lang-based mc only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
e9b41e5215 Ticket #3427: fix -Wmissing-field-initializers compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
24f0e19ac6 Ticket #3426: fix -Wmaybe-uninitialized compiler warnings...
...and use compiler option for future compiles.
Since gcc 4.7.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
587329a683 Ticket #3445: mcedit: choose filename format in the status line.
Add editor_state_full_filename option to choose full or base file name
in the mceditor status line. Option is hidden and accessible in the
mc.ini configuration file only. Disabled by default to be consistent
with the file name format in the mcviewer status line.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 18:59:09 +03:00
Andrew Borodin
5ceb5e2bef Ticket #3441: fix Linux kernel-specific segfault on startup.
Sync with gnulib 3fb6e360363744462ce15c381f0b116c6fc4ce82.

src/filemanager/mountlist.c: remove dependency on libmount.
Parse /proc/self/mountinfo directly, rather than depending on libmount,
which has many dependencies due to its dependence on libselinux, as
detailed at:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00063.html.
Note we restrict this to __linux__ as that's probably where this
interface will remain.  If ever porting, it would be best to first pull
the makedev() wrapper from coreutils to a gnulib module.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 18:45:02 +03:00
Andrew Borodin
7c3903894a Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-29 17:20:49 +03:00
Egmont Koblinger
50439cc85d Ticket #3155: align text in Info panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-29 15:47:30 +03:00
Slava Zanko
cd04e9170d Revert "Fix vertical line color if a file is marked and selected"
This reverts commit 25d554ab03.
2015-03-19 15:03:39 +03:00
oblique
25d554ab03 Fix vertical line color if a file is marked and selected 2015-03-19 11:59:54 +03:00
Andrew Borodin
be38f70704 Ticket #3285: mcedit: show full path to file in the status line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-15 07:15:23 +03:00
Andrew Borodin
8549dd9aa9 Ticket #3409: (user_menu_cmd): fix help topic for user menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-03-14 13:36:24 +03:00
Andrew Borodin
8c88aa01ad Remove code required for GLib < 2.14.0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00
Andrew Borodin
ea2e5bf0b2 Ticket #3405: mcview: use VIEW_SELECTED_COLOR in plain mode.
Thanks Andreas Mohr <and@gmx.li> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00