Implement a Key/Value environment.
K/V is a new type of environment where variable names (keys) and values are stored separately in adjacent environment elements. This should simplify wordsplit initialization in many cases. * include/mailutils/wordsplit.h (MU_WRDSF_ENV_KV): New flag. * libmailutils/string/wordsplit.c (mu_wordsplit_find_env): Implement search in a K/V environment. * libmailutils/tests/wordsplit.at: Test K/V environments. * libmailutils/tests/wsp.c (bool_keytab): Implement env_kv. (make_env_kv): New function. (main): Convert environment if env_kv is given.
Showing
4 changed files
with
90 additions
and
11 deletions
-
Please register or sign in to post a comment