return (0);
}
+void mutt_buffy (char *s, size_t slen)
+{
+ BUFFER *s_buf;
+
+ s_buf = mutt_buffer_pool_get ();
+
+ mutt_buffer_addstr (s_buf, NONULL (s));
+ mutt_buffer_buffy (s_buf);
+ strfcpy (s, mutt_b2s (s_buf), slen);
+
+ mutt_buffer_pool_release (&s_buf);
+}
+
/*
* mutt_buffy() -- incoming folders completion routine
*
* given a folder name, this routine gives the next incoming folder with new
* mail.
*/
-void mutt_buffy (char *s, size_t slen)
+void mutt_buffer_buffy (BUFFER *s)
{
BUFFY *tmp = Incoming;
int pass, found = 0;
- mutt_expand_path (s, slen);
+ mutt_buffer_expand_path (s);
if (mutt_buffy_check (0))
{
mutt_expand_path (tmp->path, sizeof (tmp->path));
if ((found || pass) && tmp->new)
{
- strfcpy (s, tmp->path, slen);
- mutt_pretty_mailbox (s, slen);
+ mutt_buffer_strcpy (s, tmp->path);
+ mutt_buffer_pretty_mailbox (s);
return;
}
- if (mutt_strcmp (s, tmp->path) == 0)
+ if (mutt_strcmp (mutt_b2s (s), tmp->path) == 0)
found = 1;
}
}
/* no folders with new mail */
- *s = '\0';
+ mutt_buffer_clear (s);
}
/* fetch buffy object for given path, if present */
extern time_t BuffyDoneTime; /* last time we knew for sure how much mail there was */
+void mutt_buffer_buffy (BUFFER *);
+void mutt_buffy (char *, size_t);
+
+int mutt_buffy_list (void);
+int mutt_buffy_check (int);
+int mutt_buffy_notify (void);
+
BUFFY *mutt_find_mailbox (const char *path);
void mutt_update_mailbox (BUFFY * b);
#include "mutt_curses.h"
#include "keymap.h"
#include "history.h"
+#include "buffy.h"
#include <string.h>
void mutt_break_thread (HEADER *);
void mutt_browser_cleanup (void);
void mutt_buffer_concat_path (BUFFER *, const char *, const char *);
-void mutt_buffy (char *, size_t);
-int mutt_buffy_list (void);
void mutt_canonical_charset (char *, size_t, const char *);
void mutt_check_stats(void);
int mutt_count_body_parts (CONTEXT *, HEADER *);
int mutt_alloc_color (int fg, int bg);
int mutt_any_key_to_continue (const char *);
char *mutt_apply_replace (char *, size_t, char *, REPLACE_LIST *);
-int mutt_buffy_check (int);
-int mutt_buffy_notify (void);
int mutt_builtin_editor (const char *, HEADER *, HEADER *);
int mutt_can_decode (BODY *);
int mutt_change_flag (HEADER *, int);