Commit Graph

78 Commits

Author SHA1 Message Date
Andrew Borodin
23c95d36ac 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:04:05 +04:00
Andrew Borodin
91ff90f87b Ticket #2386: interpretation of LANG variable needs to be case insensitive.
On Mac OS X, in the iTerm2, when the LANG variable is set to en_US.utf-8
mcedit specifically does not correctly accept input (every character press
is interpreted as a '.'). However when LANG is set to en_US.UTF-8 mcedit
works correctly (see also http://code.google.com/p/iterm2/issues/detail?id=204).

On Linux, nl_langinfo(CODESET) returns upper case UTF-8 whether the LANG is set
to utf-8 or UTF-8.
On Mac OS X, it returns the same case as the LANG input.

So let tranform result of nl_langinfo(CODESET) to upper case unconditionally.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-28 13:00:22 +04:00
Andrew Borodin
9919577962 Ticket #2738: handle errors at mc sturtup stage.
Don't run MC if configuration directory cannot be created.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-17 19:04:22 +03:00
Andrew Borodin
9f898d76dd (strutils_unescape): allow disable shell variable substitution.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-24 09:39:04 +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
1c0e5a4773 Fix potential segfault in term_trim() functions
...if requested width is negative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
6cec807140 str_isutf8() function now returns gboolean value
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:31 +03:00
Slava Zanko
91f3d8f4fd Added strrstr_skip_count() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Andrew Borodin
291abae262 (str_choose_str_functions): small fix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
77ee33e2e5 Formatting fix after indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
f70e06b37a Optimization of str_msg_term_size().
Use single function to calculate of text lines and columns
because algorithm is the same for all encodings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
1192d34bd1 Clean up some empty lines.
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
4aec2187e1 Ticket #1894: sort order should not mix hidden files with others.
In case sensitive sort, the order of files and directories is following:
hidden dirs
dirs
hidden files
files

In case insensitive mode, directories are mixed and files are mixed too:
dirs (hidden and not are mixed)
files (hidden and not are mixed).

This commit defines the sort order independently of case sensitivity:
hidden dirs
dirs
hidden files
files

Files in UTF-8 locale require special handling: leading dot must not be
processed in g_utf8_casefold() funcion.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:02:57 +03:00
Slava Zanko
3aa6758f4f identation of code
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-07 14:06:41 +03:00
Slava Zanko
973bbb70a2 Ticket #2123: crash while copying into directory named "????"
1. create directory named "????" and enter into this directory
2. point at any file in other panel
3. press F5 and Enter
Segfault

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-07 14:06:41 +03:00
Andrew Borodin
ec7b039588 Ticket #2243: code cleanup before 4.7.3 release.
Removed unneeded breaks from switch operators.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Oswald Buddenhagen
807ccb469c Ticket #2249: fix crash at startup
str_8bit_strdown() returned an incorrect value.
2010-06-30 10:15:46 +04:00
Andrew Borodin
0cb04aec3b g_strncasecmp() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Andrew Borodin
3ddec0f89d g_strcasecmp() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Vit Rosin
77575277e2 g_strdown() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Slava Zanko
47cdfd6baf Use system function strverscmp() if exists.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-22 11:08:37 +02:00
Vladimir Brednikov
3c4221bc40 Ticket #1994: Sort files by version (like strverscmp(3) does)
Suppose we have 3 files with version in their names:
 * file-2.1.tgz
 * file-2.2.tgz
 * file-2.10.tgz

It is impossible to see them in natural order using standard facilities,
they will be sorted in alphabet order:
 * file-2.1.tgz
 * file-2.10.tgz
 * file-2.2.tgz

There was some attempts to fix this. I've picked up the patch by Roland Illig <roland illig gmx de>
(http://mail.gnome.org/archives/mc-devel/2004-July/msg00016.html) and adopted it for today's git snapshot.
It adds "version" option to the sort menu, which uses copy of strverscmp function from glibc.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-22 11:08:37 +02:00
Slava Zanko
2fa4d9b952 Move logging.[ch] into library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:26 +02:00
Slava Zanko
e2f8a48ed8 Changes for build after moving strutils into library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:26 +02:00
Slava Zanko
e07ba16b3b Moved strecape.[ch] into library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko
cd4dbf3a09 Changes for build after moving strutil into lib
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko
7fa24fbc9b Moved strutil-related stuff from src into lib/strutil/*
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00