Andrew Borodin
038b5e7406
Ticket #2787 : crash when creating relative symlink.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-25 14:55:56 +04:00
Andrew Borodin
b1bcf6b01f
(resolve_symlinks): use (vfs_path_t *) as argument.
...
Minor optimization of resolve_symlinks() and diff_two_paths().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Slava Zanko
2b5c28b316
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-03-06 11:52:31 +03:00
Slava Zanko
8562a215be
Code refactoring: removed concat_dir_and_file() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
db58cd9ca7
Changed internal editor to use vfs_path_t objects.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
0aa10fd6cb
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-03-06 11:45:50 +03:00
Slava Zanko
53c500f58c
Moved functions mc_mkstemp() and mc_tempdir() to VFS module.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
3f6f89bc49
Changed interface of following functions to handle vfs_path_t object as parameter:
...
* mc_chmod()
* mc_chown()
* mc_utime()
* mc_readlink()
* mc_unlink()
* mc_mkdir()
* mc_rmdir()
* mc_mknod()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
eeaad790ab
Changed interface of mc_stat() and mc_lstat() functions
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Slava Zanko
6c32fa3b84
Added function mc_config_get_full_path() for search user's config files by short names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
6273917e33
(size_trunc_len): fixed potential integer overflow if SI is used.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
8d44ed297b
Moved xterm_flag global variable to mc_global.tty.xterm_flag
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Andrew Borodin
fc3bb20f09
(size_trunc): added ability to show size in [G|g]bytes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
12c893c73e
(size_trunc_len): process full range of uintmax_t type.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Slava Zanko
1eb91d7921
fixed x_basename function for handle URL-like paths
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
bba132381e
vfs_path_to_str() now return URL string instead of old representation
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
c58365fa64
Move check_for_default() function from lib/util.c to src/util.c
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
6016620f42
Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Slava Zanko
6c5f5bf768
VFS structure changes:
...
* moved from lib/vfs/mc-vfs to lib/vfs;
* split by directories for VFS-plugins and moved to src/vfs;
* lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:48:26 +02:00
Slava Zanko
acbe048486
Ticket #1851 : Home config directory [xdg-user-dirs]
...
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
* XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
* XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
* XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc
This is mainstream standard already adopted by many projects.
Old settings will be migrated at first time from ~/.mc to these dirs.
See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-20 17:38:27 +02:00
Andrew Borodin
fe8c5390ad
Fix of uintmax_t variables output.
...
Use PRIuMAX and PRIXMAX instead of ju and jX modifiers respectively
for formatted output of uintmax_t variables.
If PRIXMAX is not defined (i.e. in Solaris9), use PRIxMAX instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 10:58:39 +03:00
Andrew Borodin
12ccfdff6c
Ticket #2429 : overflow of file operation counters.
...
Use uintmax_t type instead of double for summary size of several files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:51 +03:00
Slava Zanko
bbf1f4e857
Moved filemanager-related stuff to src/filemanager directory
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:32 +03:00
Andrew Borodin
fdb61594df
Cleanup of main.[ch].
...
All file panels related stuff was moved to midnight.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
f24dd62dc2
Use str_msg_term_size() instead of msglen()
...
... because msglen() is not tolerant to multi-byte encodings.
Remove msglen() because it unused now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
8d1708225c
Don't include lib/util.h via lib/global.h.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
50c128a01f
is_exe() is inline now.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
d154b0f676
exist_file() is inline now.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
d543be11d9
Use g_file_get_contents() instead of load_file().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
43ed65e3d9
Moved string-related routines from lib/util.[ch] into lib/strutil.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin
593157d8cb
lib/util.[ch]: removed unused functions.
...
str_unconst(), trim(), cstrstr() and cstrcasestr() are unused and
removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin
d169d13296
Use str_trunc() directly instead of name_trunc().
...
name_trunc(): removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
53ad349a36
Moved time related stuff from lib/util.[ch] into lib/timefmt.[ch].
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
9ec4d4c08b
Check variable before g_array_free() call.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
79133154b0
Moved hooks from lib/util.[ch] to new files lib/hook.[ch]
...
... and renamed Hook to hook_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Andrew Borodin
5e0c9c911d
Moved declaration of "easy_patterns" variable from lib/util.[ch] to src/setup.[ch].
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Slava Zanko
feb733663f
Code indentation in lib directory
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Andrew Borodin
9636ca2583
Load locale-specific info (help and hints) from /usr/share/mc only.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:25:59 +04:00
Ilia Maslakov
3013a364b0
Merge commit 'origin/2287_persistent_bookmarks'
...
* commit 'origin/2287_persistent_bookmarks':
Fix in lib/logging.c for proper work on 64-bit platforms.
Change of bookmark drawing.
Fixed memory leak: destroy serialization bookmarks if file position is not saved.
Use GArray for bookmarks instead of raw array.
Minor optimization, type accuracy, includes fix.
Ticket #2287 (mcedit: persistent bookmarks)
2010-09-28 18:33:53 +04:00
Andrew Borodin
c36a810c09
Fix of file panel encoding change w/o VFS support.
...
Now --disable-vfs doesn't mean the total disabling of VFS.
With --disable-vfs option, the localfs module is built
to use the change of file panel encoding.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:43:43 +04:00
Andrew Borodin
ed18e2d093
Use GArray for bookmarks instead of raw array.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-17 17:13:10 +04:00
Andrew Borodin
3af16693e2
Minor optimization, type accuracy, includes fix.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-17 17:13:09 +04:00
Filip Sefrna
a4651d8d2b
Ticket #2287 (mcedit: persistent bookmarks)
...
Save bookmarks of internal edit in filepos
Signed-off-by: Filip Sefrna <fsefrna@gmail.com>
Type accuracy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-17 17:13:09 +04:00
Andrew Borodin
9df2f96e75
Some reorginizing of VFS private and public APIs.
...
Clean up of remained mcfs support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Andrew Borodin
17d8107e8d
Ticket #171 : fixed remained plain int types in VFS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-20 09:26:38 +04:00
Andrew Borodin
c48763fa9d
mc_util_write_backup_content(): fixed arguments in fwrite() call.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-04 23:33:48 +04:00
Andrew Borodin
df6bbf38eb
Ticket #2225 : code cleanup before 4.7.0.6 release.
...
Fixed indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-04 23:32:38 +04:00
Andrew Borodin
2b167cbef0
Configuration dialogs reorganization.
...
Panel options are moved to new dialog.
Panel setup options are collected in a special structure.
Includes clean up.
Code indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
4cea5be1ac
Ticket #2097 : clean up before 4.7.2 release.
...
Split assignments and conditions. Type accuracy. Minor optimization.
Thanks Vit Rosin for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:23:51 +04:00