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
@@ -1,5 +1,8 @@ | ||
1 | 1 | 2010-08-02 NIIBE Yutaka <gniibe@fsij.org> |
2 | 2 | |
3 | + * src-worddic/record.c (read_session): Don't change | |
4 | + rst->cur_session, rst->cur_row. | |
5 | + | |
3 | 6 | * src-util/agent.c (parse_args): Fix confvar name to "DIC_FILE" |
4 | 7 | (was: "SDIC"). |
5 | 8 |
@@ -1302,7 +1302,7 @@ read_session(struct record_stat *rst) | ||
1302 | 1302 | { |
1303 | 1303 | char **tokens; |
1304 | 1304 | int nr; |
1305 | - int in_section = 0; | |
1305 | + struct record_section* rsc = NULL; | |
1306 | 1306 | while (!anthy_read_line(&tokens, &nr)) { |
1307 | 1307 | xstr *xs; |
1308 | 1308 | int i; |
@@ -1311,11 +1311,10 @@ read_session(struct record_stat *rst) | ||
1311 | 1311 | |
1312 | 1312 | if (!strcmp(tokens[0], "---") && nr > 1) { |
1313 | 1313 | /* セクションの切れ目 */ |
1314 | - in_section = 1; | |
1315 | - rst->cur_section = do_select_section(rst, tokens[1], 1); | |
1314 | + rsc = do_select_section(rst, tokens[1], 1); | |
1316 | 1315 | goto end; |
1317 | 1316 | } |
1318 | - if (!in_section || nr < 2) { | |
1317 | + if (!rsc || nr < 2) { | |
1319 | 1318 | /* セクションが始まってない or 行が不完全 */ |
1320 | 1319 | goto end; |
1321 | 1320 | } |
@@ -1327,12 +1326,11 @@ read_session(struct record_stat *rst) | ||
1327 | 1326 | } |
1328 | 1327 | /* 次にindex */ |
1329 | 1328 | 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); | |
1331 | 1330 | anthy_free_xstr(xs); |
1332 | 1331 | if (!node) { |
1333 | 1332 | goto end; |
1334 | 1333 | } |
1335 | - rst->cur_row = node; | |
1336 | 1334 | /**/ |
1337 | 1335 | for (i = 1; i < nr; i++) { |
1338 | 1336 | if (tokens[i][0] == '"') { |
@@ -1341,13 +1339,13 @@ read_session(struct record_stat *rst) | ||
1341 | 1339 | str[strlen(str) - 1] = 0; |
1342 | 1340 | xs = anthy_cstr_to_xstr(str, rst->encoding); |
1343 | 1341 | 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); | |
1345 | 1343 | anthy_free_xstr(xs); |
1346 | 1344 | }else if (tokens[i][0] == '*') { |
1347 | 1345 | /* EMPTY entry */ |
1348 | - get_nth_val_ent(rst->cur_row, i-1, 1); | |
1346 | + get_nth_val_ent(node, i-1, 1); | |
1349 | 1347 | } 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])); | |
1351 | 1349 | } |
1352 | 1350 | } |
1353 | 1351 | end: |