• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Anthyを正かなづかひの入力と變換に對應させるパッチの作成作業リポジトリ。<git://git.debian.org/git/collab-maint/anthy.git>のmasterブランチからフォーク。


コミットメタ情報

リビジョンa12b888bfe5ec340f7e72774310bbd5d35282c60 (tree)
日時2010-08-02 13:06:25
作者NIIBE Yutaka <gniibe@fsij...>
コミッターNIIBE Yutaka

ログメッセージ

bug fix for record.c

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
11 2010-08-02 NIIBE Yutaka <gniibe@fsij.org>
22
3+ * src-worddic/record.c (read_session): Don't change
4+ rst->cur_session, rst->cur_row.
5+
36 * src-util/agent.c (parse_args): Fix confvar name to "DIC_FILE"
47 (was: "SDIC").
58
--- a/src-worddic/record.c
+++ b/src-worddic/record.c
@@ -1302,7 +1302,7 @@ read_session(struct record_stat *rst)
13021302 {
13031303 char **tokens;
13041304 int nr;
1305- int in_section = 0;
1305+ struct record_section* rsc = NULL;
13061306 while (!anthy_read_line(&tokens, &nr)) {
13071307 xstr *xs;
13081308 int i;
@@ -1311,11 +1311,10 @@ read_session(struct record_stat *rst)
13111311
13121312 if (!strcmp(tokens[0], "---") && nr > 1) {
13131313 /* セクションの切れ目 */
1314- in_section = 1;
1315- rst->cur_section = do_select_section(rst, tokens[1], 1);
1314+ rsc = do_select_section(rst, tokens[1], 1);
13161315 goto end;
13171316 }
1318- if (!in_section || nr < 2) {
1317+ if (!rsc || nr < 2) {
13191318 /* セクションが始まってない or 行が不完全 */
13201319 goto end;
13211320 }
@@ -1327,12 +1326,11 @@ read_session(struct record_stat *rst)
13271326 }
13281327 /* 次にindex */
13291328 xs = anthy_cstr_to_xstr(&tokens[0][1], rst->encoding);
1330- node = do_select_row(rst->cur_section, xs, 1, dirty);
1329+ node = do_select_row(rsc, xs, 1, dirty);
13311330 anthy_free_xstr(xs);
13321331 if (!node) {
13331332 goto end;
13341333 }
1335- rst->cur_row = node;
13361334 /**/
13371335 for (i = 1; i < nr; i++) {
13381336 if (tokens[i][0] == '"') {
@@ -1341,13 +1339,13 @@ read_session(struct record_stat *rst)
13411339 str[strlen(str) - 1] = 0;
13421340 xs = anthy_cstr_to_xstr(str, rst->encoding);
13431341 free(str);
1344- do_set_nth_xstr(rst->cur_row, i-1, xs, &rst->xstrs);
1342+ do_set_nth_xstr(node, i-1, xs, &rst->xstrs);
13451343 anthy_free_xstr(xs);
13461344 }else if (tokens[i][0] == '*') {
13471345 /* EMPTY entry */
1348- get_nth_val_ent(rst->cur_row, i-1, 1);
1346+ get_nth_val_ent(node, i-1, 1);
13491347 } else {
1350- do_set_nth_value(rst->cur_row, i-1, atoi(tokens[i]));
1348+ do_set_nth_value(node, i-1, atoi(tokens[i]));
13511349 }
13521350 }
13531351 end: