summaryrefslogtreecommitdiff
path: root/mailbox/mutil.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-11-17 18:04:52 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-11-17 18:04:52 +0000
commitc2db1deb321eb2c2cd9bfe0262ef1013ce7f617e (patch)
tree3fced821344b5f620e32e9bf60595ae8da20a0c0 /mailbox/mutil.c
parent42a7cc48c7398707710bed6f6dd8bebe755690b2 (diff)
downloadmailutils-c2db1deb321eb2c2cd9bfe0262ef1013ce7f617e.tar.gz
mailutils-c2db1deb321eb2c2cd9bfe0262ef1013ce7f617e.tar.bz2
* mailbox/sha1.h: Remove.
* include/mailutils/sha1.h: Add. * mailbox/md5.h: Remove. * include/mailutils/md5.h: Add. * include/mailutils/Makefile.am: Update. * mailbox/Makefile.am: Update. * libproto/pop/mbox.c, libproto/pop/pop3_apop.c, libproto/pop/pop3_stls.c, mailbox/md5.c, mailbox/message.c, mailbox/sha1.c, pop3d/apop.c, pop3d/pop3d.h, sql/mysql.c: Fix usage of sha1_ and md5_. * mailbox/mu_auth.c, mailbox/mutil.c, mailbox/rfc2047.c: Eliminate strtok_r.
Diffstat (limited to 'mailbox/mutil.c')
-rw-r--r--mailbox/mutil.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/mailbox/mutil.c b/mailbox/mutil.c
index ec40028fe..bfa1bc1d2 100644
--- a/mailbox/mutil.c
+++ b/mailbox/mutil.c
@@ -1438,12 +1438,20 @@ mutil_parse_field_map (const char *map, mu_assoc_t *passoc_tab, int *perr)
{
int rc;
int i;
- char *copy = strdup (map);
- char *sp, *tok;
+ int argc;
+ char **argv;
mu_assoc_t assoc_tab = NULL;
- for (tok = strtok_r (copy, ",", &sp); tok; tok = strtok_r (NULL, ",", &sp))
+ rc = mu_argcv_get (map, ":", NULL, &argc, &argv);
+ if (rc)
+ {
+ mu_error (_("cannot split line `%s': %s"), map, mu_strerror (rc));
+ return rc;
+ }
+
+ for (i = 0; i < argc; i++)
{
+ char *tok = argv[i];
char *p = strchr (tok, '=');
char *pptr;
@@ -1475,7 +1483,7 @@ mutil_parse_field_map (const char *map, mu_assoc_t *passoc_tab, int *perr)
}
}
- free (copy);
+ mu_argcv_free (argc, argv);
if (rc && perr)
*perr = i;
return rc;

Return to:

Send suggestions and report system problems to the System administrator.