if (im_hangul_is_empty (hcontext)) {
if (im_hangul_ic_is_empty (hcontext)) {
im_hangul_make_preedit_string (GtkIMContextHangul *hcontext, gchar *buf){  int i;  int n = 0;  gunichar ch;  if (im_hangul_is_empty (hcontext)) {    buf[0] = '\0';    return 0;  }  if (output_mode & OUTPUT_MODE_JAMO_EXT)    {      /* we use conjoining jamo, U+1100 - U+11FF */      if (hcontext->choseong[0] == 0)	n += g_unichar_to_utf8 (HCF, buf + n);      else	{	  for (i = 0; i <= hcontext->lindex; i++)	    n += g_unichar_to_utf8 (hcontext->choseong[i], buf + n);	}      if (hcontext->jungseong[0] == 0)	n += g_unichar_to_utf8 (HJF, buf + n);      else	{	  for (i = 0; i <= hcontext->vindex; i++)	    n += g_unichar_to_utf8 (hcontext->jungseong[i], buf + n);	}      if (hcontext->jongseong[0] != 0)	{	  for (i = 0; i <= hcontext->tindex; i++)	    n += g_unichar_to_utf8 (hcontext->jongseong[i], buf + n);	}      buf[n] = '\0';    }  else if (output_mode & OUTPUT_MODE_JAMO)    {      /* we use conjoining jamo, U+1100 - U+11FF */      if (hcontext->choseong[0] == 0)	n = g_unichar_to_utf8 (HCF, buf);      else	n = g_unichar_to_utf8 (hcontext->choseong[0], buf);         if (hcontext->jungseong[0] == 0)	n += g_unichar_to_utf8 (HJF, buf + n);      else	n += g_unichar_to_utf8 (hcontext->jungseong[0], buf + n);         if (hcontext->jongseong[0] != 0) {	n += g_unichar_to_utf8 (hcontext->jongseong[0], buf + n);      }      buf[n] = '\0';    }  else    {      /* this code is very stupid but pango has some bug in Xft       * therefore we have to do this */      if (hcontext->choseong[0])	{	  if (hcontext->jungseong[0])	    {	      /* have cho, jung, jong or no jong */	      ch = im_hangul_jamo_to_syllable (hcontext->choseong[0],					       hcontext->jungseong[0],					       hcontext->jongseong[0]);	      n = g_unichar_to_utf8 (ch, buf);	      buf[n] = '\0';	      return n;	    }	  else	    {	      if (hcontext->jongseong[0])		{		  /* have cho, jong */		  ch = im_hangul_choseong_to_cjamo (hcontext->choseong[0]);		  n = g_unichar_to_utf8 (ch, buf);		  ch = im_hangul_jongseong_to_cjamo (hcontext->jongseong[0]);		  n += g_unichar_to_utf8 (ch, buf + n);		  buf[n] = '\0';		  return n;		}	      else		{		  /* have cho */		  ch = im_hangul_choseong_to_cjamo (hcontext->choseong[0]);		  n = g_unichar_to_utf8 (ch, buf);		  buf[n] = '\0';		  return n;		}	    }	}      else	{	  if (hcontext->jungseong[0])	    {	      if (hcontext->jongseong[0]) {		/* have jung, jong */		ch = im_hangul_jungseong_to_cjamo (hcontext->jungseong[0]);		n = g_unichar_to_utf8 (ch, buf);		ch = im_hangul_jongseong_to_cjamo (hcontext->jongseong[0]);		n += g_unichar_to_utf8 (ch, buf + n);		buf[n] = '\0';		return n;	      } else {		/* have jung */		ch = im_hangul_jungseong_to_cjamo (hcontext->jungseong[0]);		n = g_unichar_to_utf8 (ch, buf);		buf[n] = '\0';		return n;	      }	    }	  else	    {	      if (hcontext->jongseong[0])		{		  /* have jong */		  ch = im_hangul_jongseong_to_cjamo (hcontext->jongseong[0]);		  n = g_unichar_to_utf8 (ch, buf);		  buf[n] = '\0';		  return n;		}	      else		{		  /* have nothing */		  ;		}	    }	}     }  return n;}