summaryrefslogtreecommitdiff
path: root/libmailutils/url
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-07-16 14:26:57 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-07-16 14:32:45 +0300
commit78f92501613a377b4c5bb2680dc071e928a96855 (patch)
tree7bf8cf9ee494415bd130d71f7dc959dc2b5e3344 /libmailutils/url
parente9871d0f003889c8fff79ee24cb23ae0c1103d5c (diff)
downloadmailutils-78f92501613a377b4c5bb2680dc071e928a96855.tar.gz
mailutils-78f92501613a377b4c5bb2680dc071e928a96855.tar.bz2
Remove dependency on obstack. Use mu_opool_t instead.
* include/mailutils/opool.h (mu_opool_alloc): New proto. * libmailutils/base/opool.c (mu_opool_alloc): New function. (mu_opool_appendz): Do not append trailing null character. * libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Reflect the change in mu_opool_appendz. * comsat/action.c: Use mu_opool_t instead of struct obstack. * lib/mailcap.c: Likewise. * libmailutils/url/urlstr.c: Likewise. * mh/burst.c: Likewise. * mh/mh_fmtgram.y: Likewise. * mh/mh_format.c: Likewise. * mh/mh_format.h: Likewise. * mh/mhn.c: Likewise. * mh/repl.c: Likewise. * mh/whatnowenv.c: Likewise. * mimeview/mimetypes.l: Likewise. * mimeview/mimeview.h: Likewise. * gnulib.modules: Remove obstack.
Diffstat (limited to 'libmailutils/url')
-rw-r--r--libmailutils/url/urlstr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libmailutils/url/urlstr.c b/libmailutils/url/urlstr.c
index 86e525021..1e2aecbb1 100644
--- a/libmailutils/url/urlstr.c
+++ b/libmailutils/url/urlstr.c
@@ -35,27 +35,27 @@ url_reconstruct_to_pool (mu_url_t url, mu_opool_t pool)
{
int i;
- mu_opool_append (pool, url->scheme, strlen (url->scheme));
+ mu_opool_appendz (pool, url->scheme);
mu_opool_append (pool, "://", 3);
if (url->flags & MU_URL_USER)
- mu_opool_append (pool, url->user, strlen (url->user));
+ mu_opool_appendz (pool, url->user);
if (url->flags & MU_URL_SECRET)
mu_opool_append (pool, ":***", 4); /* FIXME: How about MU_URL_PARSE_HIDEPASS? */
if (url->flags & MU_URL_AUTH)
{
mu_opool_append (pool, AUTH_PFX, sizeof AUTH_PFX - 1);
- mu_opool_append (pool, url->auth, strlen (url->auth));
+ mu_opool_appendz (pool, url->auth);
}
if (url->flags & MU_URL_HOST)
{
if (url->flags & (MU_URL_USER|MU_URL_SECRET|MU_URL_AUTH))
mu_opool_append_char (pool, '@');
- mu_opool_append (pool, url->host, strlen (url->host));
+ mu_opool_appendz (pool, url->host);
if (url->flags & MU_URL_PORT)
{
mu_opool_append_char (pool, ':');
- mu_opool_append (pool, url->portstr, strlen (url->portstr));
+ mu_opool_appendz (pool, url->portstr);
}
}
else if (url->flags & (MU_URL_USER|MU_URL_SECRET|MU_URL_AUTH))
@@ -65,7 +65,7 @@ url_reconstruct_to_pool (mu_url_t url, mu_opool_t pool)
{
if (url->flags & MU_URL_HOST)
mu_opool_append_char (pool, '/');
- mu_opool_append (pool, url->path, strlen (url->path));
+ mu_opool_appendz (pool, url->path);
}
if (url->flags & MU_URL_PARAM)
@@ -93,7 +93,7 @@ url_reconstruct_to_pool (mu_url_t url, mu_opool_t pool)
}
else if (url->flags == MU_URL_PATH)
{
- mu_opool_append (pool, url->path, strlen (url->path));
+ mu_opool_appendz (pool, url->path);
return 0;
}
return MU_ERR_URL_MISS_PARTS;

Return to:

Send suggestions and report system problems to the System administrator.