From: Adam Dickmeiss Date: Sun, 29 Nov 2009 21:31:56 +0000 (+0100) Subject: ICU: icu_chain_step_next_token is internal X-Git-Tag: v4.0.0~104^2~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f0b1f63415168bbc1a12f0eb3a1f03511b82c1ec;p=yaz-moved-to-github.git ICU: icu_chain_step_next_token is internal --- diff --git a/include/yaz/icu_I18N.h b/include/yaz/icu_I18N.h index ef3c13d..a2882ef 100644 --- a/include/yaz/icu_I18N.h +++ b/include/yaz/icu_I18N.h @@ -248,10 +248,6 @@ struct icu_chain_step * icu_chain_insert_step(yaz_icu_chain_t chain, const uint8_t * rule, UErrorCode *status); -int icu_chain_step_next_token(yaz_icu_chain_t chain, - struct icu_chain_step * step, - UErrorCode *status); - int icu_chain_token_number(yaz_icu_chain_t chain); const UCollator * icu_chain_get_coll(yaz_icu_chain_t chain); diff --git a/src/icu_I18N.c b/src/icu_I18N.c index 05bd02f..74b42da 100644 --- a/src/icu_I18N.c +++ b/src/icu_I18N.c @@ -540,13 +540,14 @@ int32_t icu_tokenizer_next_token(struct icu_tokenizer * tokenizer, tkn_end = tokenizer->buf16->utf16_len; /* copy out if everything is well */ - if(U_FAILURE(*status)) + if (U_FAILURE(*status)) return 0; /* everything OK, now update internal state */ tkn_len = tkn_end - tkn_start; - if (0 < tkn_len){ + if (0 < tkn_len) + { tokenizer->token_count++; tokenizer->token_id++; } else { @@ -944,9 +945,9 @@ struct icu_chain_step * icu_chain_insert_step(struct icu_chain * chain, return step; } -int icu_chain_step_next_token(struct icu_chain * chain, - struct icu_chain_step * step, - UErrorCode *status) +static int icu_chain_step_next_token(struct icu_chain * chain, + struct icu_chain_step * step, + UErrorCode *status) { struct icu_buf_utf16 * src16 = 0; int got_new_token = 0; @@ -954,7 +955,7 @@ int icu_chain_step_next_token(struct icu_chain * chain, if (!chain || !chain->src16 || !step || !step->more_tokens) return 0; - /* assign utf16 src buffers as neeed, advance in previous steps + /* assign utf16 src buffers as needed, advance in previous steps tokens until non-zero token met, and setting stop condition */ if (step->previous)