summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-09-19 13:23:50 +0300
committerSergey Poznyakoff <gray@gnu.org>2015-09-19 13:37:09 +0300
commitad3cc340266af4e1d768e6d3e59594f78cd6f940 (patch)
treec1b111a06c0b9bbe5ce806ed02089f5f1523d307 /examples
parentf160ca75991d5bf994afe3cb5bc549b113b14bbd (diff)
downloadmailutils-ad3cc340266af4e1d768e6d3e59594f78cd6f940.tar.gz
mailutils-ad3cc340266af4e1d768e6d3e59594f78cd6f940.tar.bz2
Complement f160ca75
* include/mailutils/wordsplit.h (MU_WRDSX_WORD) (MU_WRDSX_QUOTE): New constants. (mu_wordsplit_getwords): Rename to mu_wordsplit_get_words. * libmailutils/string/wordsplit.c (mu_wordsplit_getwords): Rename to mu_wordsplit_get_words. * libmailutils/base/userprivs.c (mu_switch_to_privs): Fix memory overrun when retrieving the current pointer. * examples/header.c (main): Use mu_wordsplit_get_words * imap4d/preauth.c (preauth_getvar): Rewrite according to the new API. * libmailutils/imapio/create.c (mu_imapio_create): Use MU_WRDSX_ constants to address ws_escape. * libmailutils/imapio/qstring.c: Likewise. * libmailutils/mailbox/mbx_default.c: Minor fix. * libmailutils/server/acl.c (acl_getvar): Rewrite according to the new API. * libmailutils/tests/wsp.c: Minor fix. * libmailutils/url/create.c (_mu_url_create_internal): Bugfix: alloc url->path. * libmu_sieve/extensions/list.c (retrieve_next_header): Use mu_wordsplit_get_words * libproto/mailer/prog.c (prog_getvar): Rewrite according to the new API. * libproto/mailer/smtp_gsasl.c (get_implemented_mechs): Remove unneeded assignment to ws.ws_wordv. * mh/folder.c: Use mu_wordsplit_get_words. * mh/mhn.c: Likewise. * movemail/movemail.c (movemail_getvar): Rewrite according to the new API.
Diffstat (limited to 'examples')
-rw-r--r--examples/header.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/header.c b/examples/header.c
index 9d0f6df69..2ed4a55fa 100644
--- a/examples/header.c
+++ b/examples/header.c
@@ -558,7 +558,7 @@ main (int argc, char **argv)
int c;
char buf[512];
char **prevv = NULL;
- int prevc = 0;
+ size_t prevc = 0;
interactive = isatty (0);
while ((c = getopt (argc, argv, "f:h")) != EOF)
@@ -615,10 +615,7 @@ main (int argc, char **argv)
{
docmd (ws.ws_wordc, ws.ws_wordv);
mu_argcv_free (prevc, prevv);
- prevc = ws.ws_wordc;
- prevv = ws.ws_wordv;
- ws.ws_wordc = 0;
- ws.ws_wordv = NULL;
+ mu_wordsplit_get_words (&ws, &prevc, &prevv);
}
mu_wordsplit_free (&ws);
}

Return to:

Send suggestions and report system problems to the System administrator.