NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
mailcap.h
Go to the documentation of this file.
1
23
24
#ifndef MUTT_EMAIL_MAILCAP_H
25
#define MUTT_EMAIL_MAILCAP_H
26
27
#include <stdbool.h>
28
#include <stddef.h>
29
30
struct
Body
;
31
struct
Buffer
;
32
36
struct
MailcapEntry
37
{
38
char
*
command
;
39
char
*
testcommand
;
40
char
*
composecommand
;
41
char
*
composetypecommand
;
42
char
*
editcommand
;
43
char
*
printcommand
;
44
char
*
nametemplate
;
45
char
*
convert
;
46
bool
needsterminal
: 1;
47
bool
copiousoutput
: 1;
48
bool
xneomuttkeep
: 1;
49
bool
xneomuttnowrap
: 1;
50
};
51
55
enum
MailcapLookup
56
{
57
MUTT_MC_NONE
= 0,
58
MUTT_MC_EDIT
,
59
MUTT_MC_COMPOSE
,
60
MUTT_MC_PRINT
,
61
MUTT_MC_AUTOVIEW
,
62
};
63
64
void
mailcap_entry_free
(
struct
MailcapEntry
**ptr);
65
struct
MailcapEntry
*
mailcap_entry_new
(
void
);
66
int
mailcap_expand_command
(
struct
Body
*b,
const
char
*filename,
const
char
*type,
struct
Buffer
*
command
);
67
void
mailcap_expand_filename
(
const
char
*
nametemplate
,
const
char
*oldfile,
struct
Buffer
*newfile);
68
bool
mailcap_lookup
(
struct
Body
*b,
char
*type,
size_t
typelen,
struct
MailcapEntry
*entry,
enum
MailcapLookup
opt);
69
70
#endif
/* MUTT_EMAIL_MAILCAP_H */
MailcapLookup
MailcapLookup
Mailcap actions.
Definition
mailcap.h:56
MUTT_MC_PRINT
@ MUTT_MC_PRINT
Mailcap print field.
Definition
mailcap.h:60
MUTT_MC_EDIT
@ MUTT_MC_EDIT
Mailcap edit field.
Definition
mailcap.h:58
MUTT_MC_NONE
@ MUTT_MC_NONE
No flags set.
Definition
mailcap.h:57
MUTT_MC_AUTOVIEW
@ MUTT_MC_AUTOVIEW
Mailcap autoview field.
Definition
mailcap.h:61
MUTT_MC_COMPOSE
@ MUTT_MC_COMPOSE
Mailcap compose field.
Definition
mailcap.h:59
mailcap_entry_free
void mailcap_entry_free(struct MailcapEntry **ptr)
Deallocate an struct MailcapEntry.
Definition
mailcap.c:455
mailcap_entry_new
struct MailcapEntry * mailcap_entry_new(void)
Allocate memory for a new rfc1524 entry.
Definition
mailcap.c:446
mailcap_expand_command
int mailcap_expand_command(struct Body *b, const char *filename, const char *type, struct Buffer *command)
Expand expandos in a command.
Definition
mailcap.c:70
mailcap_expand_filename
void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile)
Expand a new filename from a template or existing filename.
Definition
mailcap.c:568
mailcap_lookup
bool mailcap_lookup(struct Body *b, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt)
Find given type in the list of mailcap files.
Definition
mailcap.c:484
Body
The body of an email.
Definition
body.h:36
Buffer
String manipulation buffer.
Definition
buffer.h:36
MailcapEntry
A mailcap entry.
Definition
mailcap.h:37
MailcapEntry::composecommand
char * composecommand
Compose command.
Definition
mailcap.h:40
MailcapEntry::needsterminal
bool needsterminal
endwin() and system
Definition
mailcap.h:46
MailcapEntry::testcommand
char * testcommand
Test command.
Definition
mailcap.h:39
MailcapEntry::nametemplate
char * nametemplate
Filename template.
Definition
mailcap.h:44
MailcapEntry::printcommand
char * printcommand
Print command.
Definition
mailcap.h:43
MailcapEntry::composetypecommand
char * composetypecommand
Compose type command.
Definition
mailcap.h:41
MailcapEntry::editcommand
char * editcommand
Edit command.
Definition
mailcap.h:42
MailcapEntry::command
char * command
Command to run.
Definition
mailcap.h:38
MailcapEntry::copiousoutput
bool copiousoutput
needs pager, basically
Definition
mailcap.h:47
MailcapEntry::xneomuttkeep
bool xneomuttkeep
do not remove the file on command exit
Definition
mailcap.h:48
MailcapEntry::convert
char * convert
Conversion command.
Definition
mailcap.h:45
MailcapEntry::xneomuttnowrap
bool xneomuttnowrap
do not wrap the output in the pager
Definition
mailcap.h:49