#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"
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);
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) {
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 = m_strlen(s);
if (!strchr (s, '~') && !strchr (s, '=')) { /* yup, so spoof a real request */
/* convert old tokens into the new format */
- if (ascii_strcasecmp ("all", s) == 0 || !str_cmp ("^", s) || !str_cmp (".", s)) /* ~A is more efficient */
+ if (ascii_strcasecmp ("all", s) == 0 || !m_strcmp("^", s) || !m_strcmp(".", s)) /* ~A is more efficient */
strfcpy (s, "~A", len);
else if (ascii_strcasecmp ("del", s) == 0)
strfcpy (s, "~D", len);
strfcpy (temp, buf, sizeof (temp));
mutt_check_simple (temp, sizeof (temp), NONULL (SimpleSearch));
- if (!SearchPattern || str_cmp (temp, LastSearchExpn)) {
+ if (!SearchPattern || m_strcmp(temp, LastSearchExpn)) {
set_option (OPTSEARCHINVALID);
strfcpy (LastSearch, buf, sizeof (LastSearch));
mutt_message _("Compiling search pattern...");