*/
#include <h/mh.h>
+#include <h/utils.h>
#define RMF_SWITCHES \
X("interactive", 0, INTRSW) \
static int
rmf (char *folder)
{
- int i, j, others;
+ int i, others;
char *maildir;
char cur[BUFSIZ];
struct dirent *dp;
(void)ext_hook("del-hook", maildir, NULL);
- j = strlen(BACKUP_PREFIX);
while ((dp = readdir (dd))) {
switch (dp->d_name[0]) {
case '.':
if (m_atoi (dp->d_name))
break;
if (strcmp (dp->d_name, LINK) == 0
- || strncmp (dp->d_name, BACKUP_PREFIX, j) == 0)
+ || HasPrefix(dp->d_name, BACKUP_PREFIX))
break;
admonish (NULL, "file \"%s/%s\" not deleted",
char *cp;
struct node *np, *pp;
- alen = strlen ("atr-");
+ alen = LEN("atr-");
plen = strlen (cp = m_mailpath (folder)) + 1;
/*