mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Ticket #4131: use G_UNICODE_SPACING_MARK instead of G_UNICODE_COMBINING_MARK.
G_UNICODE_COMBINING_MARK is deperecated in glib >= 30. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
165ec38444
commit
5bf714b008
@ -70,7 +70,7 @@ str_unichar_iscombiningmark (gunichar uni)
|
|||||||
GUnicodeType type;
|
GUnicodeType type;
|
||||||
|
|
||||||
type = g_unichar_type (uni);
|
type = g_unichar_type (uni);
|
||||||
return (type == G_UNICODE_COMBINING_MARK)
|
return (type == G_UNICODE_SPACING_MARK)
|
||||||
|| (type == G_UNICODE_ENCLOSING_MARK) || (type == G_UNICODE_NON_SPACING_MARK);
|
|| (type == G_UNICODE_ENCLOSING_MARK) || (type == G_UNICODE_NON_SPACING_MARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,12 +162,6 @@
|
|||||||
|
|
||||||
/*** file scope macro definitions ****************************************************************/
|
/*** file scope macro definitions ****************************************************************/
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 30, 0)
|
|
||||||
#define SPACING_MARK G_UNICODE_SPACING_MARK
|
|
||||||
#else
|
|
||||||
#define SPACING_MARK G_UNICODE_COMBINING_MARK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The Unicode standard recommends that lonely combining characters are printed over a dotted
|
/* The Unicode standard recommends that lonely combining characters are printed over a dotted
|
||||||
* circle. If the terminal is not UTF-8, this will be replaced by a dot anyway. */
|
* circle. If the terminal is not UTF-8, this will be replaced by a dot anyway. */
|
||||||
#define BASE_CHARACTER_FOR_LONELY_COMBINING 0x25CC /* dotted circle */
|
#define BASE_CHARACTER_FOR_LONELY_COMBINING 0x25CC /* dotted circle */
|
||||||
@ -266,7 +260,7 @@ mcview_is_spacing_mark (const WView * view, int c)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
if (view->utf8)
|
if (view->utf8)
|
||||||
return g_unichar_type (c) == SPACING_MARK;
|
return g_unichar_type (c) == G_UNICODE_SPACING_MARK;
|
||||||
#else
|
#else
|
||||||
(void) view;
|
(void) view;
|
||||||
(void) c;
|
(void) c;
|
||||||
@ -535,7 +529,7 @@ mcview_next_combining_char_sequence (WView * view, mcview_state_machine_t * stat
|
|||||||
return i;
|
return i;
|
||||||
if (!mcview_ismark (view, cs[i]) || !mcview_isprint (view, cs[i]))
|
if (!mcview_ismark (view, cs[i]) || !mcview_isprint (view, cs[i]))
|
||||||
return i;
|
return i;
|
||||||
if (g_unichar_type (cs[i]) == SPACING_MARK)
|
if (g_unichar_type (cs[i]) == G_UNICODE_SPACING_MARK)
|
||||||
{
|
{
|
||||||
/* Only allow as the first combining char. Stop processing in either case. */
|
/* Only allow as the first combining char. Stop processing in either case. */
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user