Andrew Borodin
fa421e065a
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:41:11 +04:00
Andrew Borodin
bcb8c376ef
Portability: use g_ascii_strtoll instead of strtoll, atoll and atof.
...
Set minimal version of GLib up to 2.12 because of g_ascii_strtoll.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:32 +04:00
Andrew Borodin
71bae55f12
Parenthesis around some -1.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:32 +04:00
Pavel Vasilyev
9678bdc3ef
vfs_s_subclass::linear_read: return ssize_t instead of int.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:32 +04:00
Pavel Vasilyev
48c3be0a72
lib/vfs/direntry.c: types accuracy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:32 +04:00
Andrew Borodin
fd24e32c7c
lib/vfs/vfs.h: indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:31 +04:00
Andrew Borodin
a341971441
Clarify of sig_atomic_t usage (got from Mutt).
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:31 +04:00
Andrew Borodin
1ec1fbe35b
(mc_mkstemps): use g_mkstemp() to generate name of temporary file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 12:50:30 +04:00
Andrew Borodin
a8030670b7
Clarify usage of AM_CPPFLAGS.
...
Use AM_CPPFLAGS not AM_CFLAGS for includes. GLIB_CFLAGS are CPPFLAGS, actually.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:33:25 +04:00
Andrew Borodin
d6f1728fff
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:33:13 +04:00
Andrew Borodin
260bd9742d
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-08-30 13:18:34 +04:00
Slava Zanko
a1719d12cd
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:33:49 +03:00
Andrew Borodin
01088ce453
Revert "Try fix of compile warnings about assigned but unused variables"
...
This reverts commit 3d1a4ecaf7
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-18 09:43:19 +04:00
Slava Zanko
149c29f80c
Indent files.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:07:32 +04:00
Slava Zanko
3d1a4ecaf7
Try fix of compile warnings about assigned but unused variables
...
...as returned values of functions declared with attribute
warn_unused_result [-Wunused-result].
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:07:32 +04:00
Andrew Borodin
7e6c92d893
Code cleanup: removed unused variables amd removed unnedeed code.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:07:32 +04:00
Slava Zanko
5ee099d8c5
Ticket #2834 : Fixed bug 'FTBFS with --disable-vfs'
...
Steps to reproduce:
* ./configure --disable-vfs
* make
Expected result: project should be builded successfully.
Actual result:
build stopped with errors:
lib/vfs/interface.c: In function 'mc_chdir':
lib/vfs/interface.c:714: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:716: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:717: error: 'struct vfs_s_super' has no member named 'path_element'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-29 12:55:25 +03:00
Andrew Borodin
057a762e9f
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 17:06:48 +04:00
Slava Zanko
15a9a74040
Ticket #2821 : Fixed defect: ftp to a second site does not work
...
Steps to reproduce:
* cd ftp://ftp.gnome.org/
* Run "cd" in the panel where the remote site is open
* cd ftp://ftp.kernel.org/
Actual result: The directory content from ftp.gnome.org FTP-server.
Expected results: The directory content from kernel.org FTP-server.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-06 12:13:12 +03:00
Slava Zanko
e9f3b4dfd0
Ticket #2800 : Garbage directory listing in ftpfs
...
Just open any non-anonymous FTP connection.
2012-05-18 12:37:17 +03:00
Andrew Borodin
807dd268e9
(vfs_expare): changed argument type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:24 +03:00
Andrew Borodin
3d4e6884d8
(vfs_url_split): optimized to get rid of multiple string length caclulation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:24 +03:00
Andrew Borodin
4d399b8f7e
(vfs_path_element_clone): ret rid of extra actions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:23 +03:00
Andrew Borodin
f35a11e95c
(vfs_get_raw_current_dir): return pointer to constant.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 12:31:23 +03:00
Slava Zanko
b1dc778b3d
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:31:56 +03:00
Slava Zanko
73bd401db1
Ticket #2777 : Stale symlinks in vfs
...
How to reproduce:
* mkdir -p a/b/c
* touch a/b/c/d
* ln -s d a/b/c/e
* tar -cf bad.tar a
* rm -rf a
* cd bad.tar/utar://a/b/c
Expected result: 'e' should be valid symlink to 'd'
Actual result: 'e' looks like broken link
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Slava Zanko
28408d2bb9
Fixed creating string from relative non-local VFS.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Slava Zanko
f4fdd5c3df
Ticket #2758 : cd command not working in shell link
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Ilia Maslakov
97025ab61a
fixed reading the not initialized data
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
29f4c2bdf6
vfs_path: Fixed broken relative paths processing.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
27b6ef7e43
Return values of following functions are constants now:
...
* vfs_path_get_last_path_str()
* vfs_path_get_last_path_vfs()
* vfs_path_get_by_index()
* vfs_class_find_by_handle()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:53 +03:00
Slava Zanko
9dad3cf45c
Changes to handle vfs_path_t object:
...
* removed strip_password () function;
* Added new vfs_path flag: VPF_HIDE_CHARSET;
* added vfs_path_add_element() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
7f974fdbbb
VFS: Added new function vfs_path_to_str_flags()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
493a8ce96d
Code refactoring: removed concat_dir_and_file() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
95fdd25753
Changed internal editor to use vfs_path_t objects.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
fec5cd6c5d
Added function vfs_path_cmp()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d71e62c9fc
Added vfs_path_cmp() ans vfs_path_ncmp() functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
e239aaa307
VFS: internal changes in vfs_path_t type.
...
Changed type of array from slower GList to faster GArray.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
916ac05c4b
Changed format of string 'current directory path' at header of panel.
...
* path elements now are separated and shown one-by-one
(eg. ftp://some.in.net instead of ~/some/path/ftp://some.in.net)
* encoding info is shown separated at top of header line
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
5dafd4d809
Changed type of WPanel::cwd (char *) and WPanel::lwd (char *)
...
...to WPanel::cwd_vpath (vfs_path_tr *) and WPanel::lwd_vpath (vfs_path_t *).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
fdedfb5d3b
Added new fnction for manipulate vpath objects:
...
* vfs_path_append_vpath_new ()
* vfs_path_vtokens_get ()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
133cf183b5
Added vfs_path_tokens_count() and vfs_path_tokens_get() functions
...
...for easy work with vfs_path_t tokens.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
490af62655
Changed interface of functions mc_getlocalcopy() and mc_ungetlocalcopy()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
893ed22259
Added inline function vfs_path_get_last_path_vfs()
...
...to simple get VFS class for last path element without malloc/free
operations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
6cde215e0e
Added inline function vfs_path_get_last_path_str()
...
...to simple get path string without malloc/free operations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
a337f84ded
Changed input parameters of mc_mkstemp() and mc_tempdir() functions
...
to handle vfs_path_t type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
eb5543f02f
Moved functions mc_mkstemp() and mc_tempdir() to VFS module.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
d376b6ed40
Changed interface of function mc_open() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
82e07617ae
Changed interface of function mc_symlink()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
890f1f9242
Changed interface of functions mc_link() and mc_rename()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00