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
Andrew Borodin
ce568de9b9
(name_quote): refactoring
...
...and related modifications.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
89621050e3
(mc_time_elapsed): add new function to detect elapsed time intervals.
...
The author of initial patch is Egmont Koblinger.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Egmont Koblinger
a3d75ae300
Ticket #3241 : colon was not recognized inside escape seq in prompt.
...
export PS1=$'\[\e[38:5:214m\]orange$\[\e[0m\]'
mc
Expected: "orange$" prompt shows up in black under the panels.
Actual: some additional garbage.
The 256-color and true-color escape sequences should allow either ';' or
':' inside as separator, actually, ':' is the more correct according to
ECMA-48. Some terminal emulators (e.g. xterm, gnome-terminal) support
this.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-03 11:31:14 +04:00
Andrew Borodin
6d82155270
Massive use of MC_PTR_FREE macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04: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
8c040b46b8
(x_basename): fix dereference of null pointer.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +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
Veres Lajos
805703523d
Misspellings fixes by https://github.com/vlajos/misspell_fixer
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-15 11:10:41 +04:00
Andrew Borodin
5b1982a6bb
(strip_ctrl_codes): type accuracy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-08 18:06:55 +04:00
Andrew Borodin
d83902e7fc
(size_trunc_len): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 13:06:51 +04:00
Andrew Borodin
ceff7c5922
size_trunc_len() generates incorrect result in some cases.
...
Revert "(size_trunc_len): support automatic maximum unit for specified size."
This reverts commit ef94b84eaf
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 12:12:34 +04: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
Andrew Borodin
ef94b84eaf
(size_trunc_len): support automatic maximum unit for specified size.
...
Fix typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Slava Zanko
6447c76cca
Implementation of getting last editing/viewing position of file.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03: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
6cd19ea6cb
Remove irrelevant comments about file_date() function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
17cadc50ec
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-20 15:35:35 +04: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
Andrew Borodin
6c94ef16ec
Refactoring of endless loops and some type accuracy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:52 +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
acdac76a49
Revert "Try fix of compile warnings about assigned but unused variables"
...
This reverts commit 6505f7d6fa
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-18 12:03:31 +04:00
Slava Zanko
94bd4b1f78
Code indentation.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:04:05 +04:00
Slava Zanko
6505f7d6fa
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:04:05 +04:00
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