115 {
N_(
"Exit"), OP_EXIT },
116 {
N_(
"Chdir"), OP_CHANGE_DIRECTORY },
117 {
N_(
"Goto"), OP_BROWSER_GOTO_FOLDER },
118 {
N_(
"Mask"), OP_ENTER_MASK },
119 {
N_(
"Help"), OP_HELP },
127 {
N_(
"Exit"), OP_EXIT },
128 {
N_(
"List"), OP_TOGGLE_MAILBOXES },
129 {
N_(
"Subscribe"), OP_BROWSER_SUBSCRIBE },
130 {
N_(
"Unsubscribe"), OP_BROWSER_UNSUBSCRIBE },
131 {
N_(
"Catchup"), OP_CATCHUP },
132 {
N_(
"Mask"), OP_ENTER_MASK },
133 {
N_(
"Help"), OP_HELP },
150 static bool done =
false;
177 struct stat st = { 0 };
184 rc = S_ISDIR(st.st_mode);
196 const struct Folder *folder = data;
198 if (!folder->
ff->local)
210 const struct Folder *folder = data;
212 if (!folder->
ff->local)
215 bool use_c_locale =
false;
216 const char *text = node->
text;
223 char tmp[128] = { 0 };
232 strftime(tmp,
sizeof(tmp), text, &tm);
252 const struct Folder *folder = data;
262 const struct Folder *folder = data;
264 return folder->
num + 1;
272 const struct Folder *folder = data;
273 if (!folder->
ff->local)
285 const struct Folder *folder = data;
286 if (!folder->
ff->local)
289 static const time_t one_year = 31536000;
294 char tmp[128] = { 0 };
306 const struct Folder *folder = data;
307 if (!folder->
ff->local)
319 const struct Folder *folder = data;
320 if (!folder->
ff->local)
323 char tmp[128] = { 0 };
324 bool use_c_locale =
false;
326 const char *t_fmt =
NONULL(c_date_format);
352 const struct Folder *folder = data;
358 (S_ISLNK(folder->
ff->
mode) ?
360 (S_ISDIR(folder->
ff->
mode) ?
362 (((folder->
ff->
mode & S_IXUSR) != 0) ?
"*" :
""))) :
372 const struct Folder *folder = data;
374 if (folder->
ff->local)
377 S_ISDIR(folder->
ff->
mode) ?
'd' : (S_ISLNK(folder->
ff->
mode) ?
'l' :
'-'),
378 ((folder->
ff->
mode & S_IRUSR) != 0) ?
'r' :
'-',
379 ((folder->
ff->
mode & S_IWUSR) != 0) ?
'w' :
'-',
380 ((folder->
ff->
mode & S_ISUID) != 0) ?
's' :
381 ((folder->
ff->
mode & S_IXUSR) != 0) ?
'x' :
383 ((folder->
ff->
mode & S_IRGRP) != 0) ?
'r' :
'-',
384 ((folder->
ff->
mode & S_IWGRP) != 0) ?
'w' :
'-',
385 ((folder->
ff->
mode & S_ISGID) != 0) ?
's' :
386 ((folder->
ff->
mode & S_IXGRP) != 0) ?
'x' :
388 ((folder->
ff->
mode & S_IROTH) != 0) ?
'r' :
'-',
389 ((folder->
ff->
mode & S_IWOTH) != 0) ?
'w' :
'-',
390 ((folder->
ff->
mode & S_ISVTX) != 0) ?
't' :
391 ((folder->
ff->
mode & S_IXOTH) != 0) ?
'x' :
394 else if (folder->
ff->
imap)
407 const struct Folder *folder = data;
408 if (!folder->
ff->local)
411 struct group *gr = getgrgid(folder->
ff->
gid);
428 const struct Folder *folder = data;
430 const char *s = NULL;
438 (S_ISLNK(folder->
ff->
mode) ?
440 (S_ISDIR(folder->
ff->
mode) ?
442 (((folder->
ff->
mode & S_IXUSR) != 0) ?
"*" :
""))) :
451 const struct Folder *folder = data;
453 if (folder->
ff->local)
465 const struct Folder *folder = data;
466 if (!folder->
ff->local)
477 const struct Folder *folder = data;
491 const struct Folder *folder = data;
503 const struct Folder *folder = data;
517 const struct Folder *folder = data;
529 const struct Folder *folder = data;
539 const struct Folder *folder = data;
551 const struct Folder *folder = data;
561 const struct Folder *folder = data;
571 const struct Folder *folder = data;
573 char tmp[128] = { 0 };
584 const struct Folder *folder = data;
594 const struct Folder *folder = data;
597 const char *s = folder->
ff->
tagged ?
"*" :
" ";
607 const struct Folder *folder = data;
608 if (!folder->
ff->local)
611 struct passwd *pw = getpwuid(folder->
ff->
uid);
633 const char *name,
const char *desc,
634 const struct stat *st,
struct Mailbox *m,
void *data)
645 ff.
mode = st->st_mode;
646 ff.
mtime = st->st_mtime;
647 ff.
size = st->st_size;
650 ff.
nlink = st->st_nlink;
700 const char *dirname,
const char *prefix)
711 for (
unsigned int i = 0; i < adata->
groups_num; i++)
727 struct stat st = { 0 };
729 struct dirent *de = NULL;
731 while (stat(dirname, &st) == -1)
736 char *c = strrchr(dirname,
'/');
738 if (c && (c > dirname))
748 if (!S_ISDIR(st.st_mode))
770 while ((de = readdir(dir)))
789 if (S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))
791 else if (!S_ISREG(st.st_mode))
828 struct stat st = { 0 };
830 struct Buffer *mailbox = NULL;
839 for (
unsigned int i = 0; i <
adata->groups_num; i++)
843 (
mdata->subscribed && (
mdata->unread || !c_show_only_unread))))
877 if (c_browser_abbreviate_mailboxes)
899 if ((!S_ISREG(st.st_mode)) && (!S_ISDIR(st.st_mode)) && (!S_ISLNK(st.st_mode)))
904 struct stat st2 = { 0 };
912 if (st2.st_mtime > st.st_mtime)
913 st.st_mtime = st2.st_mtime;
934 struct BrowserEntryArray *entry = &priv->
state.
entry;
936 return regexec(rx,
ARRAY_GET(entry, line)->desc, 0, NULL, 0);
940 return regexec(rx, search_on, 0, NULL, 0);
952 struct BrowserEntryArray *entry = &bstate->
entry;
1022 char title[256] = { 0 };
1026 if (index >= menu->
max)
1030 if (menu->
top > index)
1039 snprintf(title,
sizeof(title),
_(
"Subscribed newsgroups"));
1043 snprintf(title,
sizeof(title),
_(
"Newsgroups on server [%s]"),
1051 snprintf(title,
sizeof(title),
_(
"Mailboxes [%d]"),
1063 snprintf(title,
sizeof(title),
_(
"Subscribed [%s], File mask: %s"),
1068 snprintf(title,
sizeof(title),
_(
"Directory [%s], File mask: %s"),
1093 sizeof(target_dir));
1099 bool matched =
false;
1127 struct BrowserEntryArray *entry = &priv->
state.
entry;
1129 if (S_ISDIR(ff->
mode) ||
1243 if (ev_w->
win != win_menu)
1288 char ***files,
int *numfiles)
1310 for (
size_t i = 0; i <
adata->groups_num; i++)
1367 if ((i <= 0) && (
buf_string(file)[0] !=
'/'))
1381 bool browser_track =
false;
1389 browser_track =
true;
1425 else if (c_spool_file)
1470 const struct Mapping *help_data = NULL;
1540 }
while (!priv->
done);
1574 { -1, -1, NULL, NULL },
1594 { -1, -1, NULL, NULL },
#define ARRAY_RESERVE(head, num)
Reserve memory for the array.
#define ARRAY_FIRST(head)
Convenience method to get the first element.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_EMPTY(head)
Check if an array is empty.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_INIT(head)
Initialize an array.
#define ARRAY_GET(head, idx)
Return the element at index.
int browser_function_dispatcher(struct MuttWindow *win, int op)
Perform a Browser function.
#define MUTT_SEL_MAILBOX
Select a mailbox.
void browser_sort(struct BrowserState *state)
Sort the entries in the browser.
@ ED_FOL_POLL
FolderFile.poll_new_mail.
@ ED_FOL_NOTIFY
FolderFile.notify_user.
@ ED_FOL_NEW_COUNT
FolderFile.nd (NntpMboxData)
@ ED_FOL_FILE_OWNER
FolderFile.uid.
@ ED_FOL_FILE_GROUP
FolderFile.gid.
@ ED_FOL_FILENAME
FolderFile.name.
@ ED_FOL_DATE_FORMAT
FolderFile.mtime.
@ ED_FOL_UNREAD_COUNT
FolderFile.msg_unread.
@ ED_FOL_FLAGS2
FolderFile.nd (NntpMboxData)
@ ED_FOL_FILE_MODE
FolderFile.move.
@ ED_FOL_NEW_MAIL
FolderFile.has_new_mail.
@ ED_FOL_FILE_SIZE
FolderFile.size.
@ ED_FOL_HARD_LINKS
FolderFile.nlink.
@ ED_FOL_DATE
FolderFile.mtime.
@ ED_FOL_STRF
FolderFile.mtime.
@ ED_FOL_TAGGED
FolderFile.tagged.
@ ED_FOL_NUMBER
Folder.num.
@ ED_FOL_DESCRIPTION
FolderFile.desc, FolderFile.name.
@ ED_FOL_MESSAGE_COUNT
FolderFile.msg_count.
@ ED_FOL_NEWSGROUP
FolderFile.name.
@ ED_FOL_FLAGS
FolderFile.nd (NntpMboxData)
#define MUTT_SEL_FOLDER
Select a local directory.
#define MUTT_SEL_MULTI
Multi-selection is enabled.
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
struct BrowserPrivateData * browser_private_data_new(void)
Create new Browser Data.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_addstr_n(struct Buffer *buf, const char *s, size_t len)
Add a string to a Buffer, expanding it if necessary.
size_t buf_len(const struct Buffer *buf)
Calculate the length of a Buffer.
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
void buf_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
size_t buf_strcpy_n(struct Buffer *buf, const char *s, size_t len)
Copy a string into a Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
size_t buf_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const struct Regex * cs_subset_regex(const struct ConfigSubset *sub, const char *name)
Get a regex config item by name.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MMDF
'mmdf' Mailbox type
@ MUTT_POP
'POP3' Mailbox type
@ MUTT_MH
'MH' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MBOX
'mbox' Mailbox type
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
@ MUTT_MAILDIR
'Maildir' Mailbox type
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ FR_UNKNOWN
Unknown function.
int examine_directory(struct Mailbox *m, struct Menu *menu, struct BrowserState *state, const char *dirname, const char *prefix)
Get list of all files/newsgroups with mask.
const struct ExpandoRenderData GroupIndexRenderData[]
Callbacks for Nntp Browser Expandos.
void init_menu(struct BrowserState *state, struct Menu *menu, struct Mailbox *m, struct MuttWindow *sbar)
Set up a new menu.
static void init_lastdir(void)
Initialise the browser directories.
const struct ExpandoRenderData FolderRenderData[]
Callbacks for Browser Expandos.
static const struct Mapping FolderNewsHelp[]
Help Bar for the NNTP Mailbox browser dialog.
struct Buffer LastDir
Browser: previous selected directory.
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
void init_state(struct BrowserState *state)
Initialise a browser state.
struct Buffer LastDirBackup
Browser: backup copy of the current directory.
static const struct Mapping FolderHelp[]
Help Bar for the File/Dir/Mailbox browser dialog.
void browser_add_folder(const struct Menu *menu, struct BrowserState *state, const char *name, const char *desc, const struct stat *st, struct Mailbox *m, void *data)
Add a folder to the browser list.
void mutt_browser_cleanup(void)
Clean up working Buffers.
void browser_highlight_default(struct BrowserState *state, struct Menu *menu)
Decide which browser item should be highlighted.
int examine_mailboxes(struct Mailbox *m, struct Menu *menu, struct BrowserState *state)
Get list of mailboxes/subscribed newsgroups.
bool link_is_dir(const char *folder, const char *path)
Does this symlink point to a directory?
@ ED_FOLDER
Folder ED_FOL_ ExpandoDataFolder.
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
DIR * mutt_file_opendir(const char *path, enum MuttOpenDirMode mode)
Open a directory.
@ MUTT_OPENDIR_NONE
Plain opendir()
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
bool OptNews
(pseudo) used to change reader mode
char * CurrentFolder
Currently selected mailbox.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
long group_index_a_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
NNTP: Alert for new mail - Implements ExpandoRenderData::get_number() -.
long folder_date_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified (strftime) - Implements ExpandoRenderData::get_number() -.
long folder_d_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified - Implements ExpandoRenderData::get_number() -.
long folder_s_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Size in bytes - Implements ExpandoRenderData::get_number() -.
long folder_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Is Tagged - Implements ExpandoRenderData::get_number() -.
long folder_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Hard links - Implements ExpandoRenderData::get_number() -.
long folder_D_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified ($date_format) - Implements ExpandoRenderData::get_number() -.
long folder_N_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: New mail flag - Implements ExpandoRenderData::get_number() -.
long folder_m_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Number of messages - Implements ExpandoRenderData::get_number() -.
long group_index_p_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
NNTP: Poll for new mail - Implements ExpandoRenderData::get_number() -.
long group_index_s_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
NNTP: Number of unread articles - Implements ExpandoRenderData::get_number() -.
long folder_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Number of unread messages - Implements ExpandoRenderData::get_number() -.
long folder_p_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Poll for new mail - Implements ExpandoRenderData::get_number() -.
long group_index_C_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
NNTP: Index number - Implements ExpandoRenderData::get_number() -.
long group_index_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
NNTP: Number of new articles - Implements ExpandoRenderData::get_number() -.
long folder_a_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Alert for new mail - Implements ExpandoRenderData::get_number() -.
long folder_C_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Index number - Implements ExpandoRenderData::get_number() -.
void folder_u(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Owner name - Implements ExpandoRenderData::get_string() -.
void folder_g(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Group name - Implements ExpandoRenderData::get_string() -.
void folder_i(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Description - Implements ExpandoRenderData::get_string() -.
void group_index_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
NNTP: Description - Implements ExpandoRenderData::get_string() -.
void folder_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Filename - Implements ExpandoRenderData::get_string() -.
void group_index_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
NNTP: Newsgroup name - Implements ExpandoRenderData::get_string() -.
void folder_m(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Number of messages - Implements ExpandoRenderData::get_string() -.
void folder_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified - Implements ExpandoRenderData::get_string() -.
void folder_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Size in bytes - Implements ExpandoRenderData::get_string() -.
void folder_date(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified (strftime) - Implements ExpandoRenderData::get_string() -.
void folder_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Is Tagged - Implements ExpandoRenderData::get_string() -.
void folder_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified ($date_format) - Implements ExpandoRenderData::get_string() -.
void folder_l(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Hard links - Implements ExpandoRenderData::get_string() -.
void group_index_M(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
NNTP: Moderated flag - Implements ExpandoRenderData::get_string() -.
void folder_N(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: New mail flag - Implements ExpandoRenderData::get_string() -.
void folder_F(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: File permissions - Implements ExpandoRenderData::get_string() -.
void folder_n(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Number of unread messages - Implements ExpandoRenderData::get_string() -.
void group_index_N(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
NNTP: New flag - Implements ExpandoRenderData::get_string() -.
void folder_space(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Fixed whitespace - Implements ExpandoRenderData::get_string() -.
void dlg_browser(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file -.
#define mutt_debug(LEVEL,...)
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe() -.
static int browser_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int browser_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
static int browser_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
void browser_private_data_free(struct BrowserPrivateData **ptr)
Free Private Browser Data - Implements MuttWindow::wdata_free() -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct SimpleDialogWindows simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
int imap_browse(const char *path, struct BrowserState *state)
IMAP hook into the folder browser.
void imap_clean_path(char *path, size_t plen)
Cleans an IMAP path using imap_fix_path.
#define GETCH_NO_FLAGS
No flags are set.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
struct tm mutt_date_localtime(time_t t)
Converts calendar time to a broken-down time structure expressed in user timezone.
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
size_t mutt_date_localtime_format_locale(char *buf, size_t buflen, const char *format, time_t t, locale_t loc)
Format localtime using a given locale.
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
const char * mutt_path_getcwd(struct Buffer *cwd)
Get the current working directory.
bool mutt_regex_match(const struct Regex *regex, const char *str)
Shorthand to mutt_regex_capture()
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
Mailbox helper functions.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
@ WT_DLG_BROWSER
Browser Dialog, dlg_browser()
@ NT_WINDOW_DELETE
Window is about to be deleted.
void mutt_get_parent_path(const char *path, char *buf, size_t buflen)
Find the parent of a path (or mailbox)
void buf_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
Some miscellaneous functions.
enum MailboxType mx_path_probe(const char *path)
Find a mailbox that understands a path.
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
Nntp-specific Account data.
Usenet network mailbox type; talk to an NNTP server.
struct NntpAccountData * CurrentNewsSrv
Current NNTP news server.
Nntp-specific Mailbox data.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
const char * opcodes_get_name(int op)
Get the name of an opcode.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH(var, head, field)
#define TAILQ_EMPTY(head)
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
#define SORT_MASK
Mask for the sort id.
SortType
Methods for sorting.
@ SORT_SUBJECT
Sort by the email's subject.
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
@ SORT_DESC
Sort by the folder's description.
void * adata
Private data (for Mailbox backends)
Private state data for the Browser.
char *** files
Array of selected files.
struct Buffer * prefix
Folder prefix string.
bool kill_prefix
Prefix is in use.
bool done
Should we close the Dialog?
bool folder
Select folders.
int last_selected_mailbox
Index of last selected Mailbox.
int * numfiles
Number of selected files.
struct Mailbox * mailbox
Mailbox.
struct BrowserState state
State containing list of files/dir/mailboxes.
struct Buffer * file
Buffer for the result.
bool multiple
Allow multiple selections.
struct MuttWindow * sbar
Status Bar.
State of the file/mailbox browser.
char * folder
Folder name.
bool is_mailbox_list
Viewing mailboxes.
struct BrowserEntryArray entry
Array of files / dirs / mailboxes.
bool imap_browse
IMAP folder.
String manipulation buffer.
char * data
Pointer to data.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
char host[128]
Server to login to.
struct ConnAccount account
Account details: username, password, etc.
const char * name
Name of config item that changed.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
The Mailbox this Event relates to.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
WindowNotifyFlags flags
Attributes of Window that changed.
const char * text
Node-specific text.
Browser entry representing a folder/dir.
bool selectable
Folder can be selected.
bool imap
This is an IMAP folder.
bool has_mailbox
This is a mailbox.
char * name
Name of file/dir/mailbox.
bool tagged
Folder is tagged.
gid_t gid
File's Group ID.
bool has_new_mail
true if mailbox has "new mail"
bool poll_new_mail
Check mailbox for new mail.
bool notify_user
User will be notified of new mail.
nlink_t nlink
Number of hard links.
char * desc
Description of mailbox.
struct NntpMboxData * nd
Extra NNTP data.
int gen
Unique id, used for (un)sorting.
time_t mtime
Modification time.
int msg_count
total number of messages
mode_t mode
File permissions.
bool inferiors
Folder has children.
int msg_unread
number of unread messages
A folder/dir in the browser.
int num
Number in the index.
struct FolderFile * ff
File / Dir / Mailbox.
struct Mailbox * mailbox
Mailbox in the list.
bool has_new
Mailbox has new mail.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
int msg_count
Total number of messages.
enum MailboxType type
Mailbox type.
bool poll_new_mail
Check for new mail.
void * mdata
Driver specific data.
char * name
A short name for the Mailbox.
bool notify_user
Notify the user of new mail.
bool visible
True if a result of "mailboxes".
int msg_unread
Number of unread messages.
int gen
Generation number, for sorting.
Mapping between user-readable string and a constant.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Container for Accounts, Notifications.
struct AccountList accounts
List of all Accounts.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
locale_t time_c_locale
Current locale but LC_TIME=C.
NNTP-specific Account data -.
struct NntpMboxData ** groups_list
struct Connection * conn
Connection to NNTP Server.
NNTP-specific Mailbox data -.
struct NntpAccountData * adata
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
Cached regular expression.
char * pattern
printable version
Tuple for the results of simple_dialog_new()
struct MuttWindow * sbar
Simple Bar.
struct MuttWindow * dlg
Main Dialog Window.
@ MENU_FOLDER
General file/mailbox browser.
@ ED_GLO_PADDING_SPACE
Space Padding.