Commit Graph

49 Commits

Author SHA1 Message Date
Slava Zanko 8a28d3bac4 Rename type file_entry to the file_entry_t.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Andrew Borodin e7dc599e42 Use "'" instead of "`" for messages and comments quoting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Slava Zanko 2406284762 Add function lib/utilunix.c:my_systemv_flags()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko c2f030f2e8 Add new functions:
* int my_systeml (int flags, const char *shell, ...);
 * int my_systemv (const char *command, char *const argv[]);

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko d32fefee76 Ticket #2206: Add jump support to target line in some external editors
Added own wrapper for _exit() system call. Useful for testing.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:32 +03:00
Ilia Maslakov 55c8f041da fixed doxygen documentation
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +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 862d53090d Code refactoring
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 c47bc3778e added vfs_path_build_filename() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Slava Zanko 1beaecdf12 Added function mc_build_filename() for processing URL-paths as well
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko f40887c3c6 Lib: removed includes to "src" directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02: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
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 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 7660a8ce66 lib/util.h: deleted unused defines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 1685730d7c OS-specific defines are moved from lib/util.h into 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 97aa4e99c9 Use g_strndup() directly instead of str_dup_range.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 8425e6fc71 Moved PATH_MAX definition from lib/util.h into lib/fs.h.
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 34c1e1a38a Removed unused enum.
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 8be556abc5 Declarations of use_dash() and rotate_dash() were moved form lib/util.h to src/layout.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:50 +04: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 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 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 be622a9981 Refactoring of configuration handling.
Some functions were renamed. Code was reorganized.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:44:43 +04:00
Andrew Borodin 9db9fd766e Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 12:12:53 +04:00
Andrew Borodin d2b23924dd Ticket #1911: use system realapth(3) function if available.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 12:08:43 +04:00
Andrew Borodin 9547a991cb Ticket #2119: some trivial corrections.
Trivial changes in util.h. Type cast in str_move function.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Martin Petricek 7c3196b60e Ticket #1767: Custom/locale-based date format
Fixed showing of datetime format in various locales (such as Polish locale)

Added new options in config file:

[Misc]
    ...
    timeformat_recent=%d.%m.%y %H:%M
    timeformat_old=%d.%m.%y %H:%M
    ...

where
    timeformat_recent - for files with mtime between now
                         and "6 moths old" (like "Nov 2 00:56")
    timeformat_old    - for other files (like "Jun 23 2007")

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-15 12:31:47 +02:00
Slava Zanko 99abd3ab9a Moved src/util.[ch] into lib, also moved unixcompat.h and utilunix.c.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00