#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
+#include <lib-lib/buffer.h>
#include "mutt.h"
-#include "buffer.h"
#include "mx.h"
#include "globals.h"
#include "sort.h"
/* imap_set_flag: append str to flags if we currently have permission
* according to aclbit */
-static void imap_set_flag (IMAP_DATA * idata, int aclbit, int flag,
- const char *str, char *flags, size_t flsize)
+static void imap_set_flag(IMAP_DATA *idata, int aclbit, int flag,
+ const char *str, char *flags, size_t flsize)
{
- if (mutt_bit_isset (idata->rights, aclbit))
- if (flag)
- str_cat (flags, flsize, str);
+ if (mutt_bit_isset(idata->rights, aclbit)) {
+ if (flag)
+ m_strcat(flags, flsize, str);
+ }
}
/* imap_make_msg_set: make an IMAP4rev1 UID message set out of a set of
if ((rc = imap_check_mailbox (ctx, index_hint, 0)) != 0)
return rc;
- memset (&cmd, 0, sizeof (cmd));
+ p_clear(&cmd, 1);
/* if we are expunging anyway, we can do deleted messages very quickly... */
if (expunge && mutt_bit_isset (idata->rights, ACL_DELETE)) {
* command on a mailbox that you have selected
*/
- if (str_cmp (mbox_unquoted, idata->mailbox) == 0
+ if (m_strcmp(mbox_unquoted, idata->mailbox) == 0
|| (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
&& str_casecmp (mbox_unquoted, idata->mailbox) == 0)) {
strfcpy (buf, "NOOP", sizeof (buf));
if (!do_search (pat, 1))
return 0;
- memset (&buf, 0, sizeof (buf));
+ p_clear(&buf, 1);
mutt_buffer_addstr (&buf, "UID SEARCH ");
if (imap_compile_search (pat, &buf) < 0) {
p_delete(&buf.data);
imap_fix_path (idata, mx.mbox, buf, sizeof (buf));
if (option (OPTIMAPCHECKSUBSCRIBED)) {
- memset (&token, 0, sizeof (token));
+ p_clear(&token, 1);
err.data = errstr;
err.dsize = sizeof (errstr);
snprintf (mbox, sizeof (mbox), "%smailboxes \"%s\"",