return 1;
}
-static struct icu_chain_step *icu_chain_step_create(
- struct icu_chain *chain, enum icu_chain_step_type type,
+static struct icu_chain_step *icu_chain_insert_step(
+ struct icu_chain *chain, enum icu_chain_step_type type,
const uint8_t *rule, UErrorCode *status)
{
struct icu_chain_step *step = 0;
default:
break;
}
+ step->previous = chain->csteps;
+ chain->csteps = step;
+
return step;
}
return chain;
}
-
-static struct icu_chain_step *icu_chain_insert_step(
- struct icu_chain *chain, enum icu_chain_step_type type,
- const uint8_t *rule, UErrorCode *status)
-{
- struct icu_chain_step *step = 0;
- if (!chain || !type || !rule)
- return 0;
-
- /* create actual chain step with this buffer */
- step = icu_chain_step_create(chain, type, rule,
- status);
-
- step->previous = chain->csteps;
- chain->csteps = step;
-
- return step;
-}
-
struct icu_iter {
struct icu_chain *chain;
struct icu_buf_utf16 *last;