Andrew Borodin
536fb676d8
(vfs_path_free): add 2nd parameter...
...
...to free or not to free the string representation
of vfs_path_t object.
It allows to get rid of string duplication in following cases:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = g_strdup (vfs_path_as_str (vpath));
vfs_path_free (vpath);
Now we can write:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = vfs_path_free (vpath, FALSE);
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:52:39 +03:00
Andrew Borodin
9ee52e77c3
Ticket #4179 : code clean up before 4.8.27 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
31b37a1f79
Ticket #4050 : code cleanup before 4.8.25 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Andrew Borodin
68d9961977
Ticket #4022 : fix compile failure on AIX 7.2.
...
Rename MC VFS flags to avoid name conflicts with system-wide VFS flags
on some OSes (such as AIX).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-18 21:27:56 +03:00
Andrew Borodin
210ccc2f65
(vfs_path_from_str_uri_parser): get rid of extra type cast.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
672ba46c8b
VFS: make vfs_class and vfs_s_subclass related macros more readable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
0fbd98fece
Join vfs_class_flags_t and vfs_subclass_flags_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
c764d60238
VFS: (vfs_s_subclass): derive from vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
1dd8a47987
Ticket #3955 : code cleanup before 4.8.23 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
1fec6e9854
Partially revert "VFS: (vfs_s_subclass): make the derived class from vfs_class."
...
This reverts commit 5d1284c4a6
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-10 12:47:12 +03:00
Andrew Borodin
5d1284c4a6
VFS: (vfs_s_subclass): make the derived class from vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
6e994011f5
(vfs_path_url_split): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
3424622d5a
(vfs_path_from_str_deprecated_parser, vfs_path_from_str_uri_parser): remove unused flags argument.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
8715c41a47
(vfs_path_from_str_uri_parser): fix detection of relative path.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
e9fd11bfcd
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
9df8bc2d12
(vfs_path_deserialize): refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andrew Borodin
de0e960de5
(vfs_path_serialize): get rid of dynamic string allocation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
eef076cef6
cppcheck: Cleanup Passing NULL after the last typed argument warning
...
Cleanup Passing NULL after the last typed argument warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
3231160d99
lib/vfs/path.c: cleanup some -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andreas Mohr
b9797d6637
Use meaningful errno or 0.
...
Use real errno or set it to 0 when no meaningful error code exists
for current user error message.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andrew Borodin
3e622b822e
(vfs_get_current_dir): avoid string duplication.
...
(vfs_get_current_dir_n): new function returned newly allocated string.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:21 +03:00
Andrew Borodin
e9db0a0c12
(vfs_canon): merge local variables.
2015-11-05 14:32:52 +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
Andrew Borodin
42e7e39bd8
Add IS_PATH_SEP macro and use it.
...
Also massive use of PATH_SEP and PATH_SEP_STR macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:13:02 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Slava Zanko
512ad7d962
Make working with GError in more right way (like with exceptions).
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Andrew Borodin
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Slava Zanko
0ed4a91d7d
Reduce cppcheck warnings (style) in lib subdirectory.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
0d489acd58
cppcheck: reduce variable scope.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
a57d45d590
Ticket #3098 : vfs_path_from_str_flags() doesn't support VPF_STRIP_HOME
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-08 16:57:42 +03: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
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
Slava Zanko
857fe38e87
Fix panel recoding
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-23 14:15:24 +04:00
Andrew Borodin
3662b84ba1
(vfs_get_encoding): optimization and enhancement:
...
* get rid of extra memory duplication;
* support of recursive search of correct encoding;
* add tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Slava Zanko
2640b21bb9
Remove vfs_path_to_str() function for avoid often memory allocations.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 14:21:01 +03:00
Slava Zanko
c984447f8e
Rename vfs_path_cmp() to vfs_path_equals()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Slava Zanko
ee8aaf6181
Avoid compiler errors like: error: variable 'xxx' set but not used [-Werror=unused-but-set-variable]
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-01-17 15:21:35 +03:00
Andrew Borodin
2940b7455d
Fix of DOXYGEN docs: @return instead of @returns
...
...and other minor corrections.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Ilia Maslakov
55c8f041da
fixed doxygen documentation
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +03:00
Andrew Borodin
4a0004f6c2
Ticket #2874 : enter on directory named '~' goes to the home one.
...
Revert "Support of use ~ as home directory in hotlist."
This partially reverts commit dd9c7516a3
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 10:30:28 +04:00
Slava Zanko
949d257f37
Ticket #2791 : Fixed: cannot Copy/Move files with filename encoding change
...
Steps to reproduce:
* run mc
* change encoding one of panels to any different from system encoding
* try to copy any file to panel with changed encoding
Expected result: files should be copied.
Actual result: error box here.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-29 13:30:28 +03:00
Andrew Borodin
908e747861
Optimization of ini files load.
...
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
315c499c09
Ticket #2827 : tweak and cleanup of code in case of --disable-charset option usage.
...
First step: tweak vfs-related code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-25 16:56:11 +04:00
Andrew Borodin
58cf4e735c
(vfs_path_element_clone): ret rid of extra actions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:10 +03:00
Slava Zanko
0a44a9ff5f
Ticket #2779 : Active VFS directories list contain incorrect current path
...
1) login to any ftp or fish resource
2) select ftp/fish entry and change current path
3) go back to old path
4) press Ctrl+X A (open "Active VFS directories" dialog)
Expected result: should be correct path to current VFS path
Actual result: path is incorrect.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:23:13 +03:00
Slava Zanko
88483f5fac
Fixed creating string from relative non-local VFS.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:28:45 +03:00
Ilia Maslakov
0f9083f9c0
fixed reading the not initialized data
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-03-15 12:47:46 +03:00