Merge branch '3389_spacing_mark'

* 3389_spacing_mark:
  Ticket #3389: mcviewer: clarify usage of G_UNICODE_SPACING_MARK.
This commit is contained in:
Andrew Borodin 2015-02-20 09:08:07 +03:00
commit b3b4b4df1d

View File

@ -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)