#endif
#include <lib-lib/mem.h>
+#include <lib-lib/ascii.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/buffer.h>
#include "mutt.h"
-#include "buffer.h"
#include "handler.h"
#include "enter.h"
-#include "ascii.h"
#include "mx.h"
#include "mapping.h"
#include "keymap.h"
#include "copy.h"
#include "mime.h"
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/str.h"
#ifdef USE_IMAP
#include "mx.h"
if ((msg = mx_open_message (ctx, msgno)) != NULL) {
if (option (OPTTHOROUGHSRC)) {
/* decode the header / body */
- memset (&s, 0, sizeof (s));
+ p_clear(&s, 1);
s.fpin = msg->fp;
s.flags = M_CHARCONV;
mutt_mktemp (tempfile);
match = 1;
break;
}
- lng -= str_len (buf);
+ lng -= m_strlen(buf);
}
p_delete(&buf);
BUFFER buf;
int r;
- memset (&buf, 0, sizeof (buf));
+ p_clear(&buf, 1);
if (mutt_extract_token (&buf, s, M_TOKEN_PATTERN | M_TOKEN_COMMENT) != 0 ||
!buf.data) {
#endif
if (pat->stringmatch) {
- pat->str = str_dup (buf.data);
+ pat->str = m_strdup(buf.data);
p_delete(&buf.data);
} else {
pat->rx = p_new(regex_t, 1);
BUFFER buffer;
struct tm min, max;
- memset (&buffer, 0, sizeof (buffer));
+ p_clear(&buffer, 1);
if (mutt_extract_token (&buffer, s, M_TOKEN_COMMENT | M_TOKEN_PATTERN) != 0
|| !buffer.data) {
strfcpy (err->data, _("error in expression"), err->dsize);
return (-1);
}
- memset (&min, 0, sizeof (min));
+ p_clear(&min, 1);
/* the `0' time is Jan 1, 1970 UTC, so in order to prevent a negative time
when doing timezone conversion, we use Jan 2, 1970 UTC as the base
here */
min.tm_mday = 2;
min.tm_year = 70;
- memset (&max, 0, sizeof (max));
+ p_clear(&max, 1);
/* Arbitrary year in the future. Don't set this too high
or mutt_mktime() returns something larger than will
char *buf;
BUFFER ps;
- memset (&ps, 0, sizeof (ps));
+ p_clear(&ps, 1);
ps.dptr = s;
- ps.dsize = str_len (s);
+ ps.dsize = m_strlen(s);
while (*ps.dptr) {
SKIPWS (ps.dptr);
mutt_message _("Compiling search pattern...");
- simple = str_dup (buf);
+ simple = m_strdup(buf);
mutt_check_simple (buf, sizeof (buf), NONULL (SimpleSearch));
err.data = error;