NeoMutt  2019-12-07-60-g0cfa53
Teaching an old dog new tricks
DOXYGEN
mailcap.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_MAILCAP_H
24 #define MUTT_MAILCAP_H
25 
26 #include <stddef.h>
27 #include <stdbool.h>
28 
29 struct Body;
30 struct Buffer;
31 
32 /* These Config Variables are only used in rfc1524.c */
33 extern bool C_MailcapSanitize;
34 
39 {
40  char *command;
41  char *testcommand;
44  char *editcommand;
45  char *printcommand;
46  char *nametemplate;
47  char *convert;
48  bool needsterminal : 1;
49  bool copiousoutput : 1;
50  bool xneomuttkeep : 1;
51 };
52 
57 {
63 };
64 
65 void mailcap_entry_free(struct MailcapEntry **ptr);
66 struct MailcapEntry *mailcap_entry_new(void);
67 int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command);
68 void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile);
69 bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt);
70 
71 #endif /* MUTT_MAILCAP_H */
bool xneomuttkeep
do not remove the file on command exit
Definition: mailcap.h:50
A mailcap entry.
Definition: mailcap.h:38
char * convert
Definition: mailcap.h:47
Mailcap autoview field.
Definition: mailcap.h:62
char * composetypecommand
Definition: mailcap.h:43
String manipulation buffer.
Definition: buffer.h:33
No flags set.
Definition: mailcap.h:58
void mailcap_entry_free(struct MailcapEntry **ptr)
Deallocate an struct MailcapEntry.
Definition: mailcap.c:437
The body of an email.
Definition: body.h:34
Mailcap compose field.
Definition: mailcap.h:60
Mailcap print field.
Definition: mailcap.h:61
bool copiousoutput
needs pager, basically
Definition: mailcap.h:49
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:521
char * editcommand
Definition: mailcap.h:44
char * command
Definition: mailcap.h:40
bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt)
Find given type in the list of mailcap files.
Definition: mailcap.c:466
int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command)
Expand expandos in a command.
Definition: mailcap.c:69
char * printcommand
Definition: mailcap.h:45
char * nametemplate
Definition: mailcap.h:46
MailcapLookup
Mailcap actions.
Definition: mailcap.h:56
char * composecommand
Definition: mailcap.h:42
Mailcap edit field.
Definition: mailcap.h:59
bool C_MailcapSanitize
Config: Restrict the possible characters in mailcap expandos.
Definition: mailcap.c:48
struct MailcapEntry * mailcap_entry_new(void)
Allocate memory for a new rfc1524 entry.
Definition: mailcap.c:428
bool needsterminal
endwin() and system
Definition: mailcap.h:48
char * testcommand
Definition: mailcap.h:41