NeoMutt  2024-04-25-1-g3de005
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mailcap.h
Go to the documentation of this file.
1
24#ifndef MUTT_MAILCAP_H
25#define MUTT_MAILCAP_H
26
27#include <stddef.h>
28#include <stdbool.h>
29
30struct Body;
31struct Buffer;
32
37{
38 char *command;
45 char *convert;
46 bool needsterminal : 1;
47 bool copiousoutput : 1;
48 bool xneomuttkeep : 1;
50};
51
56{
62};
63
64void mailcap_entry_free(struct MailcapEntry **ptr);
66int mailcap_expand_command(struct Body *b, const char *filename, const char *type, struct Buffer *command);
67void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile);
68bool mailcap_lookup(struct Body *b, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt);
69
70#endif /* MUTT_MAILCAP_H */
MailcapLookup
Mailcap actions.
Definition: mailcap.h:56
@ MUTT_MC_PRINT
Mailcap print field.
Definition: mailcap.h:60
@ MUTT_MC_EDIT
Mailcap edit field.
Definition: mailcap.h:58
@ MUTT_MC_AUTOVIEW
Mailcap autoview field.
Definition: mailcap.h:61
@ MUTT_MC_NO_FLAGS
No flags set.
Definition: mailcap.h:57
@ MUTT_MC_COMPOSE
Mailcap compose field.
Definition: mailcap.h:59
void mailcap_entry_free(struct MailcapEntry **ptr)
Deallocate an struct MailcapEntry.
Definition: mailcap.c:454
struct MailcapEntry * mailcap_entry_new(void)
Allocate memory for a new rfc1524 entry.
Definition: mailcap.c:445
int mailcap_expand_command(struct Body *b, const char *filename, const char *type, struct Buffer *command)
Expand expandos in a command.
Definition: mailcap.c:69
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:552
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:483
The body of an email.
Definition: body.h:36
String manipulation buffer.
Definition: buffer.h:36
A mailcap entry.
Definition: mailcap.h:37
char * composecommand
Definition: mailcap.h:40
bool needsterminal
endwin() and system
Definition: mailcap.h:46
char * testcommand
Definition: mailcap.h:39
char * nametemplate
Definition: mailcap.h:44
char * printcommand
Definition: mailcap.h:43
char * composetypecommand
Definition: mailcap.h:41
char * editcommand
Definition: mailcap.h:42
char * command
Definition: mailcap.h:38
bool copiousoutput
needs pager, basically
Definition: mailcap.h:47
bool xneomuttkeep
do not remove the file on command exit
Definition: mailcap.h:48
char * convert
Definition: mailcap.h:45
bool xneomuttnowrap
do not wrap the output in the pager
Definition: mailcap.h:49