50 const struct Folder *folder = data;
51 if (!folder->
ff->local)
54 static const time_t one_year = 31536000;
59 char tmp[128] = { 0 };
71 const struct Folder *folder = data;
72 if (!folder->
ff->local)
84 const struct Folder *folder = data;
85 if (!folder->
ff->local)
88 char tmp[128] = { 0 };
89 bool use_c_locale =
false;
91 const char *t_fmt =
NONULL(c_date_format);
116 const struct Folder *folder = data;
117 if (!folder->
ff->local)
129 const struct Folder *folder = data;
131 if (!folder->
ff->local)
134 bool use_c_locale =
false;
135 const char *text = node->
text;
142 char tmp[128] = { 0 };
151 strftime(tmp,
sizeof(tmp), text, &tm);
162 const struct Folder *folder = data;
164 if (!folder->
ff->local)
176 const struct Folder *folder = data;
178 const char *s = NULL;
186 (S_ISLNK(folder->
ff->
mode) ?
188 (S_ISDIR(folder->
ff->
mode) ?
190 (((folder->
ff->
mode & S_IXUSR) != 0) ?
"*" :
""))) :
200 const struct Folder *folder = data;
206 (S_ISLNK(folder->
ff->
mode) ?
208 (S_ISDIR(folder->
ff->
mode) ?
210 (((folder->
ff->
mode & S_IXUSR) != 0) ?
"*" :
""))) :
220 const struct Folder *folder = data;
221 if (!folder->
ff->local)
224 struct group *gr = getgrgid(folder->
ff->
gid);
241 const struct Folder *folder = data;
243 if (folder->
ff->local)
246 S_ISDIR(folder->
ff->
mode) ?
'd' : (S_ISLNK(folder->
ff->
mode) ?
'l' :
'-'),
247 ((folder->
ff->
mode & S_IRUSR) != 0) ?
'r' :
'-',
248 ((folder->
ff->
mode & S_IWUSR) != 0) ?
'w' :
'-',
249 ((folder->
ff->
mode & S_ISUID) != 0) ?
's' :
250 ((folder->
ff->
mode & S_IXUSR) != 0) ?
'x' :
252 ((folder->
ff->
mode & S_IRGRP) != 0) ?
'r' :
'-',
253 ((folder->
ff->
mode & S_IWGRP) != 0) ?
'w' :
'-',
254 ((folder->
ff->
mode & S_ISGID) != 0) ?
's' :
255 ((folder->
ff->
mode & S_IXGRP) != 0) ?
'x' :
257 ((folder->
ff->
mode & S_IROTH) != 0) ?
'r' :
'-',
258 ((folder->
ff->
mode & S_IWOTH) != 0) ?
'w' :
'-',
259 ((folder->
ff->
mode & S_ISVTX) != 0) ?
't' :
260 ((folder->
ff->
mode & S_IXOTH) != 0) ?
'x' :
263 else if (folder->
ff->
imap)
276 const struct Folder *folder = data;
277 if (!folder->
ff->local)
280 struct passwd *pw = getpwuid(folder->
ff->
uid);
297 const struct Folder *folder = data;
299 char tmp[128] = { 0 };
310 const struct Folder *folder = data;
320 const struct Folder *folder = data;
321 if (!folder->
ff->local)
332 const struct Folder *folder = data;
334 if (folder->
ff->local)
346 const struct Folder *folder = data;
359 const struct Folder *folder = data;
373 const struct Folder *folder = data;
385 const struct Folder *folder = data;
394 const struct Folder *folder = data;
404 const struct Folder *folder = data;
406 return folder->
num + 1;
414 const struct Folder *folder = data;
425 const struct Folder *folder = data;
428 const char *s = folder->
ff->
tagged ?
"*" :
" ";
437 const struct Folder *folder = data;
447 const struct Folder *folder = data;
460 const struct Folder *folder = data;
502 { -1, -1, NULL, NULL },
const struct ExpandoRenderCallback FolderRenderCallbacks[]
Callbacks for Browser Expandos.
@ ED_FOL_POLL
FolderFile.poll_new_mail.
@ ED_FOL_NOTIFY
FolderFile.notify_user.
@ 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_DATE_STRF
FolderFile.mtime.
@ ED_FOL_UNREAD_COUNT
FolderFile.msg_unread.
@ 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_TAGGED
FolderFile.tagged.
@ ED_FOL_NUMBER
Folder.num.
@ ED_FOL_DESCRIPTION
FolderFile.desc, FolderFile.name.
@ ED_FOL_MESSAGE_COUNT
FolderFile.msg_count.
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(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.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
@ ED_FOLDER
Folder ED_FOL_ ExpandoDataFolder.
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
static long folder_date_strf_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified (strftime) - Implements get_number_t -.
static long folder_message_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Number of messages - Implements get_number_t -.
static long folder_file_size_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Size in bytes - Implements get_number_t -.
static long folder_hard_links_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Hard links - Implements get_number_t -.
static long folder_number_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Index number - Implements get_number_t -.
static long folder_new_mail_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: New mail flag - Implements get_number_t -.
static long folder_tagged_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Is Tagged - Implements get_number_t -.
static long folder_notify_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Alert for new mail - Implements get_number_t -.
static long folder_poll_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Poll for new mail - Implements get_number_t -.
static long folder_date_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified - Implements get_number_t -.
static long folder_unread_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Number of unread messages - Implements get_number_t -.
static long folder_date_format_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Browser: Last modified ($date_format) - Implements get_number_t -.
static void folder_new_mail(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: New mail flag - Implements get_string_t -.
static void folder_tagged(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Is Tagged - Implements get_string_t -.
static void folder_description(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Description - Implements get_string_t -.
static void folder_date_strf(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified (strftime) - Implements get_string_t -.
static void folder_date(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified - Implements get_string_t -.
static void folder_file_mode(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: File permissions - Implements get_string_t -.
static void folder_date_format(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Last modified ($date_format) - Implements get_string_t -.
static void folder_file_group(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Group name - Implements get_string_t -.
static void folder_file_size(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Size in bytes - Implements get_string_t -.
static void global_padding_space(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Fixed whitespace - Implements get_string_t -.
static void folder_filename(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Filename - Implements get_string_t -.
static void folder_hard_links(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Hard links - Implements get_string_t -.
static void folder_file_owner(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Owner name - Implements get_string_t -.
static void folder_message_count(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Number of messages - Implements get_string_t -.
static void folder_unread_count(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Browser: Number of unread messages - Implements get_string_t -.
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.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Some miscellaneous functions.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
String manipulation buffer.
const char * text
Node-specific text.
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.
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.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
locale_t time_c_locale
Current locale but LC_TIME=C.
@ ED_GLO_PADDING_SPACE
Space Padding.