projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove yet anoter round of str_* functions, replaced with their inlineable
[apps/madmutt.git]
/
mx.c
diff --git
a/mx.c
b/mx.c
index
4160eeb
..
370bb9f
100644
(file)
--- a/
mx.c
+++ b/
mx.c
@@
-13,12
+13,13
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
#include "mutt.h"
#include "buffy.h"
#include "mutt.h"
#include "buffy.h"
-#include "ascii.h"
#include "mx.h"
#include "mbox.h"
#include "mh.h"
#include "mx.h"
#include "mbox.h"
#include "mh.h"
@@
-73,7
+74,7
@@
static list2_t* MailboxFormats = NULL;
#define MX_COMMAND(idx,cmd) ((mx_t*) MailboxFormats->data[idx])->cmd
#define MX_IDX(idx) (idx >= 0 && idx < MailboxFormats->length)
#define MX_COMMAND(idx,cmd) ((mx_t*) MailboxFormats->data[idx])->cmd
#define MX_IDX(idx) (idx >= 0 && idx < MailboxFormats->length)
-#define mutt_is_spool(s) (
str_cmp
(Spoolfile, s) == 0)
+#define mutt_is_spool(s) (
m_strcmp
(Spoolfile, s) == 0)
#ifdef USE_DOTLOCK
/* parameters:
#ifdef USE_DOTLOCK
/* parameters:
@@
-193,7
+194,7
@@
int mx_lock_file (const char *path, int fd, int excl, int dot, int timeout)
struct flock lck;
struct flock lck;
-
memset (&lck, 0, sizeof (struct flock)
);
+
p_clear(&lck, 1
);
lck.l_type = excl ? F_WRLCK : F_RDLCK;
lck.l_whence = SEEK_SET;
lck.l_type = excl ? F_WRLCK : F_RDLCK;
lck.l_whence = SEEK_SET;
@@
-294,7
+295,7
@@
int mx_unlock_file (const char *path, int fd, int dot)
#ifdef USE_FCNTL
struct flock unlockit;
#ifdef USE_FCNTL
struct flock unlockit;
-
memset (&unlockit, 0, sizeof (struct flock)
);
+
p_clear(&unlockit, 1
);
unlockit.l_type = F_UNLCK;
unlockit.l_whence = SEEK_SET;
fcntl (fd, F_SETLK, &unlockit);
unlockit.l_type = F_UNLCK;
unlockit.l_whence = SEEK_SET;
fcntl (fd, F_SETLK, &unlockit);
@@
-625,7
+626,7
@@
void mx_fastclose_mailbox (CONTEXT * ctx)
if (ctx->limit_pattern)
mutt_pattern_free (&ctx->limit_pattern);
safe_fclose (&ctx->fp);
if (ctx->limit_pattern)
mutt_pattern_free (&ctx->limit_pattern);
safe_fclose (&ctx->fp);
-
memset (ctx, 0, sizeof (CONTEXT)
);
+
p_clear(ctx, 1
);
}
/* save changes to disk */
}
/* save changes to disk */