wordsplit: add incremental mode.
* include/mailutils/wordsplit.h (MU_WRDSF_INCREMENTAL): New flag. (MU_WRDSE_NOINPUT): New error code. * libmailutils/string/wordsplit.c (mu_wordsplit_init0): New function. (mu_wordsplit_init): Call mu_wordsplit_init0. (expvar): Use MU_WRDSF_WS instead of MU_WRDSF_SQUEEZE_DELIMS in call to subordinate mu_wordsplit. (skip_delim): If both MU_WRDSF_RETURN_DELIMS and MU_WRDSF_SQUEEZE_DELIMS are given, squeeze only the same delimiter characters. * libmailutils/tests/wordsplit.at: Add tests for incremental mode. * libmailutils/tests/wsp.c: Support incremental mode.
Showing
4 changed files
with
202 additions
and
47 deletions
-
Please register or sign in to post a comment