X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=buffy.c;h=6c9ef3ec9289cb66810fb6ddca5bb155d12f0f06;hp=c7bbc406b5f6c8205b66c278c4d4a9ca877a8dcc;hb=717c9f150ded0fed572d27f68db07f94a9fe70e8;hpb=6da6d7aac2c1a10e07957960dc4f27026075258e diff --git a/buffy.c b/buffy.c index c7bbc40..6c9ef3e 100644 --- a/buffy.c +++ b/buffy.c @@ -29,19 +29,12 @@ static time_t ImapBuffyTime = 0; /* last time we started checking for mail */ static short BuffyCount = 0; /* how many boxes with new mail */ static short BuffyNotify = 0; /* # of unnotified new boxes */ -static inline void buffy_delete(BUFFY** p) -{ - p_delete(&(*p)->path); - p_delete(p); -} -DO_ARRAY_FUNCS(BUFFY, buffy, buffy_delete); - /* Return the index number of path in Incoming list */ int buffy_lookup(const char* path) { int i; - if (!path || !*path) + if (m_strisempty(path)) return -1; for (i = 0; i < Incoming.len; i++) { @@ -64,7 +57,7 @@ int buffy_parse_mailboxes(BUFFER *path, BUFFER *s, unsigned long data, mutt_extract_token(path, s, 0); m_strcpy(buf, sizeof(buf), path->data); - if (data == M_UNMAILBOXES && !strcmp(buf, "*")) { + if (data == M_UNMAILBOXES && !m_strcmp(buf, "*")) { buffy_array_wipe(&Incoming); return 0; } @@ -319,7 +312,7 @@ int buffy_list (void) { char buffylist[LONG_STRING]; int have_unnotified = BuffyNotify; - int pos = 0, first = 0, i; + int pos = 0, first = 1, i; pos = m_strcpy(buffylist, sizeof(buffylist), _("New mail in "));