3 new revisions:

Revision: bc40465eef8b
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:16:25 2012
Log:      Fix SEGV by clicking a candidate shown by uim-bushuconv....
http://code.google.com/p/uim/source/detail?r=bc40465eef8b

Revision: e9e4d11cc723
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:17:06 2012
Log: Fix invalid char sequence error on long line of bushudict of uim-bushu...
http://code.google.com/p/uim/source/detail?r=e9e4d11cc723

Revision: 884f4ce07362
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:17:35 2012
Log:      Add comment about interactive bushu conversion algorithm....
http://code.google.com/p/uim/source/detail?r=884f4ce07362

==============================================================================
Revision: bc40465eef8b
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:16:25 2012
Log:      Fix SEGV by clicking a candidate shown by uim-bushuconv.
Change to emit index-changed signal after selection changed,
instead of emitting before selection change.

* gtk2/immodule/uim-cand-win-vertical-gtk.c
  - (tree_selection_change): Change not to emit signal here.
  - (tree_selection_changed): Emit signal if index_changed flag is set.
* gtk2/immodule/uim-cand-win-gtk.h
  - (_UIMCandWinGtk): Add member variable index_changed.
* gtk2/immodule/uim-cand-win-gtk.c
  - (uim_cand_win_gtk_init): Add initialization of index_changed variable.

http://code.google.com/p/uim/source/detail?r=bc40465eef8b

Modified:
 /gtk2/immodule/uim-cand-win-gtk.c
 /gtk2/immodule/uim-cand-win-gtk.h
 /gtk2/immodule/uim-cand-win-vertical-gtk.c

=======================================
--- /gtk2/immodule/uim-cand-win-gtk.c   Thu Jun 14 21:35:12 2012
+++ /gtk2/immodule/uim-cand-win-gtk.c   Fri Aug 31 16:16:25 2012
@@ -169,6 +169,7 @@
   uim_cand_win_gtk_get_window_pos_type(cwin);

   cwin->block_index_selection = FALSE;
+  cwin->index_changed = FALSE;

   cwin->cursor.x = cwin->cursor.y = 0;
   cwin->cursor.width = cwin->cursor.height = 0;
=======================================
--- /gtk2/immodule/uim-cand-win-gtk.h   Thu Jun 14 21:35:12 2012
+++ /gtk2/immodule/uim-cand-win-gtk.h   Fri Aug 31 16:16:25 2012
@@ -74,6 +74,7 @@

   GdkRectangle  cursor;
   gboolean block_index_selection;
+  gboolean index_changed;

   /* sub window */
   struct sub_window {
=======================================
--- /gtk2/immodule/uim-cand-win-vertical-gtk.c  Thu Jun 14 21:35:12 2012
+++ /gtk2/immodule/uim-cand-win-vertical-gtk.c  Fri Aug 31 16:16:25 2012
@@ -209,7 +209,13 @@
   if (!path_currently_selected && cwin->candidate_index != idx) {
     if (cwin->candidate_index >= 0) {
       cwin->candidate_index = idx;
-      g_signal_emit_by_name(G_OBJECT(cwin), "index-changed");
+      /* if emit "index-changed" here and IM deactivates this candwin,
+       * activates new candwin and selects a candidate on new candwin
+ * from index-changed callback, SEGV occurs in gtk because gtk tries to + * select on old candwin after return of this tree_selection_change().
+       * To avoid SEGV, instead of emitting before selection change by gtk,
+       * emit after selection changed by gtk. */
+      cwin->index_changed = TRUE;
     }

     uim_cand_win_gtk_update_label(cwin);
@@ -263,6 +269,11 @@
       cwin->sub_window.active = FALSE;
     }
   }
+
+  if (cwin->index_changed) {
+    cwin->index_changed = FALSE;
+    g_signal_emit_by_name(G_OBJECT(cwin), "index-changed");
+  }

   return TRUE;
 }

==============================================================================
Revision: e9e4d11cc723
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:17:06 2012
Log: Fix invalid char sequence error on long line of bushudict of uim-bushuconv.

* uim/look.c (uim_look_look_internal):
  - Increase buf size for bushu dictionary file of uim-bushuconv.

http://code.google.com/p/uim/source/detail?r=e9e4d11cc723

Modified:
 /uim/look.c

=======================================
--- /uim/look.c Wed Jan 11 00:17:24 2012
+++ /uim/look.c Fri Aug 31 16:17:06 2012
@@ -52,7 +52,7 @@
 {
   uim_lisp ret_ = uim_scm_null();
   int words = args->words;
-  char buf[4096];
+  char buf[8192];
   size_t len = strlen(args->dict_str);

   while (uim_look_get(args->dict_str, buf, sizeof(buf), args->ctx) != 0) {

==============================================================================
Revision: 884f4ce07362
Author:   KIHARA Hideto <[email protected]>
Date:     Fri Aug 31 16:17:35 2012
Log:      Add comment about interactive bushu conversion algorithm.

* scm/tutcode-bushu.scm
  - Add comment.

http://code.google.com/p/uim/source/detail?r=884f4ce07362

Modified:
 /scm/tutcode-bushu.scm

=======================================
--- /scm/tutcode-bushu.scm      Tue Jul  3 04:39:54 2012
+++ /scm/tutcode-bushu.scm      Fri Aug 31 16:17:35 2012
@@ -31,7 +31,72 @@
 ;;; tutcode-bushu.scm: ÂÐÏÃŪ¤ÊÉô¼ó¹çÀ®ÊÑ´¹
 ;;;
 ;;; tc-2.3.1¤Îtc-bushu.el¤ò°Ü¿¢(sort¤Ç¤ÎÂǤÁ¤ä¤¹¤µ¤Î¹Íθ¤Ï̤Âбþ)¡£
-;;; (»²¹Í:Éô¼ó¹çÀ®¥¢¥ë¥´¥ê¥º¥à¤Ï[tcode-ml:1942]¤¢¤¿¤ê)
+;;; (»²¹Í:Éô¼ó¹çÀ®¥¢¥ë¥´¥ê¥º¥à¤Ï[tcode-ml:1942]¤¢¤¿¤ê¡£°Ê²¼È´¿è)
+;;; ¡üÄêµÁ
+;;; ¡û¦²¤òÁ´Ê¸»ú¤Î½¸¹ç¤È¤¹¤ë¡£
+;;; ¡û¦°¤òÁ´Éô¼ó¤Î½¸¹ç¤È¤¹¤ë¡£(¦° ¢¾ ¦²¤Ç¤Ê¤¯¤Æ¤â¤è¤¤¤Ï¤º¡£)
+;;; ¡û³ÆÊ¸»úc ¢º ¦²¤ÏÉô¼óp ¢º ¦°¤Î½¸¹ç¤«¤éÀ®¤ë¡£
+;;; ¡û°Ê²¼¤Î½¸¹ç¤òʸ»úa¤Èʸ»úb¤Î¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;;
+;;; {c | c ¢º ¦², c ¢½ a' ¢À b', a' ¢¼ a (a' ¡â ¶õ½¸¹ç), b' ¢¼ b (b' ¡â ¶õ½¸¹ç)
+;;;        c ¡â a, c ¡â b }
+;;;
+;;;   ÆÃ¤Ë¡¢ a' = a ¤«¤Ä b' = b ¤Î¾ì¹ç¤ò¶¯¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;;   ¶¯¹çÀ®½¸¹ç¤Ç¤Ê¤¤¹çÀ®½¸¹ç¤ò¼å¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;;
+;;; ¡û°Ê²¼¤Î½¸¹ç¤òʸ»úa¤Èʸ»úb¤Îº¹¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;;
+;;;   {c | c ¢º ¦², c ¢¼ a- ¢À b-}
+;;;
+;;;   ¤³¤³¤Ç¡¢a-¡¢b-¤ÎÄêµÁ¤Ï¼¡¤È¤ª¤ê¤Ç¤¢¤ë¡£
+;;;         a- = a \ (a ¢Á b)
+;;;         b- = b \ (a ¢Á b)
+;;;
+;;;   ÆÃ¤Ë¡¢(a- = ¶õ½¸¹ç) ¤Þ¤¿¤Ï (b- = ¶õ½¸¹ç)¤Î¾ì¹ç¤ò¶¯º¹¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;;   ¶¯º¹¹çÀ®½¸¹ç¤Ç¤Ê¤¤º¹¹çÀ®½¸¹ç¤ò¼åº¹¹çÀ®½¸¹ç¤È¸Æ¤Ö¡£
+;;; --------------------------------------------------------
+;;; ¡üÉô¼ó¹çÀ®ÊÑ´¹¤ÎÍ¥Àè½ç°Ì
+;;; (1) ¶¯¹çÀ®½¸¹ç
+;;;       Ê£¿ô¤¢¤ë¾ì¹ç¤Ï¡¢Éô¼ó¤Î½¸¹ç¤ÎÍ×ÁÇ¿ô¤¬¾®¤µ¤¤Êý¤¬Í¥Àè?
+;;; (2) ¶¯º¹¹çÀ®½¸¹ç
+;;; (3) ¼å¹çÀ®½¸¹ç
+;;; (4) ¼åº¹¹çÀ®½¸¹ç
+;;; --------------------------------------------------------
+;;;
+;;; Îã:
+;;;
+;;; Á² ¢á {¥·, ¼Ö, ¶Ô}
+;;; »Â ¢á {¼Ö, ¶Ô}
+;;;
+;;; ¹Æ ¢á {²Ó, ¹â}
+;;; »ä ¢á {²Ó, ¥à}
+;;; --------
+;;;
+;;; (i) a = ¥· ¢á {¥·}¡¢ b = »Â¤Î¾ì¹ç
+;;;
+;;;   a ¢À b = {¥·, ¼Ö, ¶Ô} ¤ª¤è¤Ó¡ÖÁ² ¢½ a ¢À b¡×¤è¤ê¡¢
+;;;   ¡ÖÁ²¡×¤Ï¶¯¹çÀ®½¸¹ç¤ÎÍ×ÁǤˤʤ롣
+;;;
+;;; (ii) a = ¥·¡¢ b = ¼Ö ¢á {¼Ö} ¤Î¾ì¹ç
+;;;
+;;;   a ¢À b = {¥·, ¼Ö} ¤ª¤è¤Ó¡ÖÁ² ¢½ a ¢À b¡×¤è¤ê¡¢
+;;;   ¡ÖÁ²¡×¤Ï¶¯¹çÀ®½¸¹ç¤ÎÍ×ÁǤˤʤ롣
+;;;
+;;; (iii) a = »ä¡¢b = ¹â ¢á {¹â} ¤Î¾ì¹ç
+;;;
+;;;   a' = {²Ó}, b' = {¹â} ¤È¤¹¤ë¤È¡¢
+;;;   a' ¢À b' = {²Ó, ¹â} ¤Ç¤¢¤ê¡¢¤«¤Ä¡Ö¹Æ ¢½ a' ¢À b'¡×¤è¤ê
+;;;   ¡Ö¹Æ¡×¤Ï¼å¹çÀ®½¸¹ç¤ÎÍ×ÁǤˤʤ롣
+;;;
+;;; (iv) a = »ä¡¢b = ¥à ¤Î¾ì¹ç
+;;;
+;;;   a- = {¥à}¡¢b- = ¶õ½¸¹ç ¤è¤ê¡¢
+;;;   ¡Ö¥à¡×¤Ï¶¯º¹¹çÀ®½¸¹ç¤ÎÍ×ÁǤˤʤ롣
+;;;
+;;; (v) a = »ä¡¢b = ¹Æ ¤Î¾ì¹ç
+;;;
+;;;   a- = {¥à}¡¢b- = {¹â}¤è¤ê¡¢
+;;;   ¡Ö¥à¡×¤ª¤è¤Ó¡Ö¹â¡×¤Ï¼åº¹¹çÀ®½¸¹ç¤ÎÍ×ÁǤˤʤ롣

 (require-extension (srfi 1 2 8 69 95))
 (require "util.scm")

Reply via email to