Handle the attachments command. More...
#include "config.h"#include <stdbool.h>#include <stdio.h>#include <string.h>#include "mutt/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "commands.h"#include "commands/lib.h"#include "ncrypt/lib.h"#include "parse/lib.h"#include "module_data.h"
Include dependency graph for commands.c:Go to the source code of this file.
Data Structures | |
| struct | AttachMatch |
| An attachment matching a regex for attachment counter. More... | |
Macros | |
| #define | MIME_DEPTH_MAX 50 |
| Maximum MIME nesting depth for counting body parts. | |
Functions | |
| void | attachmatch_free (struct AttachMatch **ptr) |
| Free an AttachMatch - Implements list_free_t -. | |
| struct AttachMatch * | attachmatch_new (void) |
| Create a new AttachMatch. | |
| static bool | count_body_parts_check (struct ListHead *checklist, struct Body *b, bool dflt) |
| Compares mime types to the ok and except lists. | |
| static int | count_body_parts (struct Body *b, int depth) |
| Count the MIME Body parts. | |
| int | mutt_count_body_parts (struct Email *e, FILE *fp) |
| Count the MIME Body parts. | |
| void | mutt_attachments_reset (struct MailboxView *mv) |
| Reset the attachment count for all Emails. | |
| static enum CommandResult | parse_attach_list (const struct Command *cmd, struct Buffer *line, struct ListHead *head, struct Buffer *err) |
| Parse the "attachments" command. | |
| static enum CommandResult | parse_unattach_list (const struct Command *cmd, struct Buffer *line, struct ListHead *head, struct Buffer *err) |
| Parse the "unattachments" command. | |
| static int | print_attach_list (struct ListHead *h, const char op, const char *name) |
| Print a list of attachments. | |
| enum CommandResult | parse_attachments (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'attachments' command - Implements Command::parse() -. | |
| enum CommandResult | parse_unattachments (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'unattachments' command - Implements Command::parse() -. | |
| void | mutt_parse_mime_message (struct Email *e, FILE *fp) |
| Parse a MIME email. | |
| enum CommandResult | parse_mime_lookup (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'mime-lookup' command - Implements Command::parse() -. | |
| enum CommandResult | parse_unmime_lookup (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'unmime-lookup' command - Implements Command::parse() -. | |
Variables | |
| const struct Command | AttachCommands [] |
| Attach Commands. | |
Handle the attachments command.
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 commands.c.
| #define MIME_DEPTH_MAX 50 |
Maximum MIME nesting depth for counting body parts.
Definition at line 121 of file commands.c.
| struct AttachMatch * attachmatch_new | ( | void | ) |
Create a new AttachMatch.
| ptr | New AttachMatch |
Definition at line 78 of file commands.c.
Here is the caller graph for this function:
|
static |
Compares mime types to the ok and except lists.
| checklist | List of AttachMatch |
| b | Email Body |
| dflt | Log whether the matches are OK, or Excluded |
| true | Attachment should be counted |
Definition at line 90 of file commands.c.
Here is the caller graph for this function:
|
static |
Count the MIME Body parts.
| b | Body of email |
| depth | Current recursion depth |
| num | Number of MIME Body parts |
Definition at line 129 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_count_body_parts | ( | struct Email * | e, |
| FILE * | fp ) |
Count the MIME Body parts.
| e | |
| fp | File to parse |
| num | Number of MIME Body parts |
Definition at line 226 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_attachments_reset | ( | struct MailboxView * | mv | ) |
Reset the attachment count for all Emails.
| mv | Mailbox view |
Definition at line 266 of file commands.c.
Here is the caller graph for this function:
|
static |
Parse the "attachments" command.
| cmd | Command being parsed |
| line | Buffer containing the attachments command |
| head | List of AttachMatch to add to |
| err | Buffer for error messages |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Definition at line 291 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Parse the "unattachments" command.
| cmd | Command being parsed |
| line | Buffer containing the unattachments command |
| head | List of AttachMatch to remove from |
| err | Buffer for error messages |
| MUTT_CMD_SUCCESS | Always |
Definition at line 380 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Print a list of attachments.
| h | List of attachments |
| op | Operation, e.g. '+', '-' |
| name | Attached/Inline, 'A', 'I' |
| 0 | Always |
Definition at line 452 of file commands.c.
Here is the caller graph for this function:| void mutt_parse_mime_message | ( | struct Email * | e, |
| FILE * | fp ) |
Parse a MIME email.
| e | |
| fp | File to parse |
Definition at line 627 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| const struct Command AttachCommands[] |
Attach Commands.
Definition at line 680 of file commands.c.