Manage where the email is piped to external commands. More...
#include "config.h"#include <limits.h>#include <stdbool.h>#include <stdio.h>#include <sys/stat.h>#include <sys/types.h>#include "mutt/lib.h"#include "address/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "alias/lib.h"#include "gui/lib.h"#include "mutt.h"#include "external.h"#include "attach/lib.h"#include "browser/lib.h"#include "complete/lib.h"#include "editor/lib.h"#include "history/lib.h"#include "imap/lib.h"#include "ncrypt/lib.h"#include "parse/lib.h"#include "progress/lib.h"#include "question/lib.h"#include "send/lib.h"#include "copy.h"#include "globals.h"#include "hook.h"#include "mutt_logging.h"#include "mutt_mailbox.h"#include "mutt_thread.h"#include "muttlib.h"#include "mx.h"#include "protos.h"#include "notmuch/lib.h"#include <libintl.h>
Include dependency graph for external.c:Go to the source code of this file.
Functions | |
| void | external_cleanup (void) |
| Clean up commands globals. | |
| void | index_bounce_message (struct Mailbox *m, struct EmailArray *ea) |
| Bounce an email. | |
| static void | pipe_set_flags (bool decode, bool print, CopyMessageFlags *cmflags, CopyHeaderFlags *chflags) |
| Generate flags for copy header/message. | |
| static void | pipe_msg (struct Mailbox *m, struct Email *e, struct Message *msg, FILE *fp, bool decode, bool print) |
| Pipe a message. | |
| static int | pipe_message (struct Mailbox *m, struct EmailArray *ea, const char *cmd, bool decode, bool print, bool split, const char *sep) |
| Pipe message to a command. | |
| void | mutt_pipe_message (struct Mailbox *m, struct EmailArray *ea) |
| Pipe a message. | |
| void | mutt_print_message (struct Mailbox *m, struct EmailArray *ea) |
| Print a message. | |
| bool | mutt_select_sort (bool reverse) |
| Ask the user for a sort method. | |
| bool | mutt_shell_escape (void) |
| Invoke a command in a subshell. | |
| void | mutt_enter_command (void) |
| Enter a neomutt command. | |
| void | mutt_display_address (struct Envelope *env) |
| Display the address of a message. | |
| static void | set_copy_flags (struct Email *e, enum MessageTransformOpt transform_opt, CopyMessageFlags *cmflags, CopyHeaderFlags *chflags) |
| Set the flags for a message copy. | |
| int | mutt_save_message_mbox (struct Mailbox *m_src, struct Email *e, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt, struct Mailbox *m_dst) |
| Save a message to a given mailbox. | |
| int | mutt_save_message (struct Mailbox *m, struct EmailArray *ea, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt) |
| Save an email. | |
| bool | mutt_edit_content_type (struct Email *e, struct Body *b, FILE *fp) |
| Edit the content type of an attachment. | |
| static bool | check_traditional_pgp (struct Mailbox *m, struct Email *e) |
| Check for an inline PGP content. | |
| bool | mutt_check_traditional_pgp (struct Mailbox *m, struct EmailArray *ea) |
| Check if a message has inline PGP content. | |
Variables | |
| static struct Buffer | LastSaveFolder = { 0 } |
| The folder the user last saved to. Used by ci_save_message() | |
Manage where the email is piped to external commands.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file external.c.
| void external_cleanup | ( | void | ) |
Clean up commands globals.
Definition at line 80 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void index_bounce_message | ( | struct Mailbox * | m, |
| struct EmailArray * | ea ) |
Bounce an email.
| m | Mailbox |
| ea | Array of Emails to bounce |
Definition at line 90 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Generate flags for copy header/message.
| [in] | decode | If true decode the message |
| [in] | If true, mark the message for printing | |
| [out] | cmflags | Flags, see CopyMessageFlags |
| [out] | chflags | Flags, see CopyHeaderFlags |
Definition at line 190 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Pipe a message.
| m | Mailbox |
| e | Email to pipe |
| msg | Message |
| fp | File to write to |
| decode | If true, decode the message |
| If true, message is for printing |
Definition at line 226 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Pipe message to a command.
| m | Mailbox |
| ea | Array of Emails to pipe |
| cmd | Command to pipe to |
| decode | Should the message be decrypted |
| True if this is a print job | |
| split | Should a separator be sent between messages? |
| sep | Separator string |
| 0 | Success |
| 1 | Error |
The following code is shared between printing and piping.
Definition at line 278 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_pipe_message | ( | struct Mailbox * | m, |
| struct EmailArray * | ea ) |
Pipe a message.
| m | Mailbox |
| ea | Array of Emails to pipe |
Definition at line 407 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_print_message | ( | struct Mailbox * | m, |
| struct EmailArray * | ea ) |
Print a message.
| m | Mailbox |
| ea | Array of Emails to print |
Definition at line 438 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool mutt_select_sort | ( | bool | reverse | ) |
Ask the user for a sort method.
| reverse | If true make it a reverse sort |
| true | The sort type changed |
Definition at line 476 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool mutt_shell_escape | ( | void | ) |
Invoke a command in a subshell.
| true | A command was invoked (no matter what its result) |
| false | No command was invoked |
Definition at line 579 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_enter_command | ( | void | ) |
Enter a neomutt command.
Definition at line 621 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_display_address | ( | struct Envelope * | env | ) |
Display the address of a message.
| env | Envelope containing address |
Definition at line 661 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Set the flags for a message copy.
| [in] | e | |
| [in] | transform_opt | Transformation, e.g. TRANSFORM_DECRYPT |
| [out] | cmflags | Flags, see CopyMessageFlags |
| [out] | chflags | Flags, see CopyHeaderFlags |
Definition at line 686 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_save_message_mbox | ( | struct Mailbox * | m_src, |
| struct Email * | e, | ||
| enum MessageSaveOpt | save_opt, | ||
| enum MessageTransformOpt | transform_opt, | ||
| struct Mailbox * | m_dst ) |
Save a message to a given mailbox.
| m_src | Mailbox to copy from |
| e | |
| save_opt | Copy or move, e.g. SAVE_MOVE |
| transform_opt | Transformation, e.g. TRANSFORM_DECRYPT |
| m_dst | Mailbox to save to |
| 0 | Success |
| -1 | Error |
Definition at line 737 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_save_message | ( | struct Mailbox * | m, |
| struct EmailArray * | ea, | ||
| enum MessageSaveOpt | save_opt, | ||
| enum MessageTransformOpt | transform_opt ) |
Save an email.
| m | Mailbox |
| ea | Array of Emails to save |
| save_opt | Copy or move, e.g. SAVE_MOVE |
| transform_opt | Transformation, e.g. TRANSFORM_DECRYPT |
| 0 | Copy/save was successful |
| -1 | Error/abort |
Definition at line 778 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:Edit the content type of an attachment.
| e | |
| b | Attachment |
| fp | File handle to the attachment |
| true | A Any change is made |
recvattach requires the return code to know when to regenerate the actx.
Definition at line 1070 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:Check for an inline PGP content.
| true | Message contains inline PGP content |
Definition at line 1183 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool mutt_check_traditional_pgp | ( | struct Mailbox * | m, |
| struct EmailArray * | ea ) |
Check if a message has inline PGP content.
| m | Mailbox |
| ea | Array of Emails to check |
| true | Message contains inline PGP content |
Definition at line 1211 of file external.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
The folder the user last saved to. Used by ci_save_message()
Definition at line 75 of file external.c.