summaryrefslogtreecommitdiff
path: root/mh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-10-30 10:50:07 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-10-30 10:50:07 +0200
commitb54540cbbc95069b6d073246a575683170920275 (patch)
treebf7d188d6ae5fa434be6a71b9c415b0d163b8aab /mh
parentc6848f52257191abb36b694be61ce333a8992b4b (diff)
downloadmailutils-b54540cbbc95069b6d073246a575683170920275.tar.gz
mailutils-b54540cbbc95069b6d073246a575683170920275.tar.bz2
Improve opool API
* configure.ac: Version 2.99.993 * NEWS: Update. * include/mailutils/opool.h (MU_OPOOL_DEFAULT) (MU_OPOOL_ENOMEMABRT): New defines. (mu_opool_create): Change meaning of the 2nd argument. All uses updated. (mu_opool_free, mu_opool_dup): New proto. * libmailutils/base/opool.c (_mu_opool) <memerr>: Replace with flags. <head,tail,free>: Rename. (mu_opool_free, mu_opool_dup): New functions. (mu_opool_head): Bugfix.
Diffstat (limited to 'mh')
-rw-r--r--mh/burst.c2
-rw-r--r--mh/mh_fmtgram.y2
-rw-r--r--mh/mh_format.c2
-rw-r--r--mh/mhn.c10
-rw-r--r--mh/prompter.c2
-rw-r--r--mh/repl.c2
-rw-r--r--mh/whatnowenv.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/mh/burst.c b/mh/burst.c
index 173a8f719..4d5a3b791 100644
--- a/mh/burst.c
+++ b/mh/burst.c
@@ -678,7 +678,7 @@ main (int argc, char **argv)
mu_attribute_set_deleted (attr);
}
mu_mailbox_expunge (tmpbox);
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
}
else
tmpbox = mbox;
diff --git a/mh/mh_fmtgram.y b/mh/mh_fmtgram.y
index 018bdcebf..9b690b7b9 100644
--- a/mh/mh_fmtgram.y
+++ b/mh/mh_fmtgram.y
@@ -499,7 +499,7 @@ mh_format_parse (char *format_str, mh_format_t *fmt)
if (p)
yydebug = 1;
start = curp = format_str;
- mu_opool_create (&tokpool, 1);
+ mu_opool_create (&tokpool, MU_OPOOL_ENOMEMABRT);
format.prog = NULL;
format.progsize = 0;
pc = 0;
diff --git a/mh/mh_format.c b/mh/mh_format.c
index 77e4e8531..c74a260b9 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -490,7 +490,7 @@ mh_format (mh_format_t *fmt, mu_message_t msg, size_t msgno,
mach.width = width - 1; /* Count the newline */
mach.pc = 1;
- mu_opool_create (&mach.pool, 1);
+ mu_opool_create (&mach.pool, MU_OPOOL_ENOMEMABRT);
mu_list_create (&mach.addrlist);
reset_fmt_defaults (&mach);
diff --git a/mh/mhn.c b/mh/mhn.c
index b3c2cb776..2ebd8c383 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -461,7 +461,7 @@ mhn_compose_command (char *typestr, char *typeargs, int *flags, char *file)
%F %f, and stdout is not redirected
%s subtype */
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
p = mu_str_skip_class (str, MU_CTYPE_SPACE);
@@ -642,7 +642,7 @@ mhn_show_command (mu_message_t msg, msg_part_t part, int *flags,
%s subtype
%d content description */
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
p = mu_str_skip_class (str, MU_CTYPE_SPACE);
@@ -814,7 +814,7 @@ mhn_store_command (mu_message_t msg, msg_part_t part, const char *name,
%p part
%s subtype */
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
for (p = str; *p; p++)
{
@@ -1883,7 +1883,7 @@ parse_type_command (char **pcmd, struct compose_env *env, mu_header_t hdr)
return 1;
}
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
mu_opool_appendz (pool, type);
mu_opool_append_char (pool, '/');
@@ -2050,7 +2050,7 @@ edit_extern (char *cmd, struct compose_env *env, mu_message_t *msg, int level)
mu_message_get_header (*msg, &hdr);
- mu_opool_create (&pool, 1);
+ mu_opool_create (&pool, MU_OPOOL_ENOMEMABRT);
mu_opool_append (pool, EXTCONTENT, sizeof (EXTCONTENT) - 1);
*--rest = ';'; /* FIXME */
rc = parse_content_type (env, pool, &rest, &id, NULL);
diff --git a/mh/prompter.c b/mh/prompter.c
index 5c4405fc5..2efde12f0 100644
--- a/mh/prompter.c
+++ b/mh/prompter.c
@@ -156,7 +156,7 @@ main (int argc, char **argv)
mu_opool_t opool;
const char *prompt = name;
- mu_opool_create (&opool, 1);
+ mu_opool_create (&opool, MU_OPOOL_ENOMEMABRT);
do
{
size_t len;
diff --git a/mh/repl.c b/mh/repl.c
index 13fa8c9eb..fefa6a28a 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -73,7 +73,7 @@ set_fcc (struct mu_parseopt *po, struct mu_option *opt, char const *arg)
{
if (!has_fcc)
{
- mu_opool_create (&fcc_pool, 1);
+ mu_opool_create (&fcc_pool, MU_OPOOL_ENOMEMABRT);
has_fcc = 1;
}
else
diff --git a/mh/whatnowenv.c b/mh/whatnowenv.c
index f4af15622..81b9368ce 100644
--- a/mh/whatnowenv.c
+++ b/mh/whatnowenv.c
@@ -84,7 +84,7 @@ mh_whatnow_env_to_environ (struct mh_whatnow_env *wh)
int mrange = 0;
const char *s;
- mu_opool_create (&opool, 1);
+ mu_opool_create (&opool, MU_OPOOL_ENOMEMABRT);
mu_list_get_iterator (wh->anno_list, &itr);
for (mu_iterator_first (itr); !mu_iterator_is_done (itr);
mu_iterator_next (itr))

Return to:

Send suggestions and report system problems to the System administrator.