mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Ticket #3389: mcviewer: clarify usage of G_UNICODE_SPACING_MARK.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
1c7c344ca4
commit
34a25459d2
@ -162,6 +162,12 @@
|
||||
|
||||
/*** 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
|
||||
* 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 */
|
||||
@ -260,7 +266,7 @@ mcview_is_spacing_mark (const mcview_t * view, int c)
|
||||
{
|
||||
#ifdef HAVE_CHARSET
|
||||
if (view->utf8)
|
||||
return g_unichar_type (c) == G_UNICODE_SPACING_MARK;
|
||||
return g_unichar_type (c) == SPACING_MARK;
|
||||
#else
|
||||
(void) view;
|
||||
(void) c;
|
||||
@ -530,7 +536,7 @@ mcview_next_combining_char_sequence (mcview_t * view, mcview_state_machine_t * s
|
||||
return i;
|
||||
if (!mcview_ismark (view, cs[i]) || !mcview_isprint (view, cs[i]))
|
||||
return i;
|
||||
if (g_unichar_type (cs[i]) == G_UNICODE_SPACING_MARK)
|
||||
if (g_unichar_type (cs[i]) == SPACING_MARK)
|
||||
{
|
||||
/* Only allow as the first combining char. Stop processing in either case. */
|
||||
if (i == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user