NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
expando.c
Go to the documentation of this file.
1
22
28
29#include <stdbool.h>
30#include <stdio.h>
31#include "mutt/lib.h"
32#include "core/lib.h"
33#include "expando.h"
34#include "lib.h"
35#include "expando/lib.h"
36
40static void compress_from(const struct ExpandoNode *node, void *data,
41 MuttFormatFlags flags, struct Buffer *buf)
42{
43 const struct Mailbox *m = data;
44
45 buf_quote_filename(buf, m->realpath, false);
46}
47
51static void compress_to(const struct ExpandoNode *node, void *data,
52 MuttFormatFlags flags, struct Buffer *buf)
53{
54 const struct Mailbox *m = data;
55
56 buf_quote_filename(buf, mailbox_path(m), false);
57}
58
65 // clang-format off
68 { -1, -1, NULL, NULL },
69 // clang-format on
70};
const struct ExpandoRenderCallback CompressRenderCallbacks[]
Callbacks for Compression Hook Expandos.
Definition expando.c:64
Compress Expando definitions.
Compressed mbox local mailbox type.
@ ED_CMP_FROM
'from' path
Definition lib.h:51
@ ED_CMP_TO
'to' path
Definition lib.h:52
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition mailbox.h:213
@ ED_COMPRESS
Compress ED_CMP_ ExpandoDataCompress.
Definition domain.h:40
Parse Expando string.
void buf_quote_filename(struct Buffer *buf, const char *filename, bool add_outer)
Quote a filename to survive the shell's quoting rules.
Definition file.c:807
static void compress_from(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Compress: From filename - Implements get_string_t -.
Definition expando.c:40
static void compress_to(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Compress: To filename - Implements get_string_t -.
Definition expando.c:51
Convenience wrapper for the library headers.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition render.h:32
String manipulation buffer.
Definition buffer.h:36
Basic Expando Node.
Definition node.h:67
A mailbox.
Definition mailbox.h:78
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition mailbox.h:80