NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
muttlib.h
Go to the documentation of this file.
1
23
24#ifndef MUTT_MUTTLIB_H
25#define MUTT_MUTTLIB_H
26
27#include <stdbool.h>
28#include <stdio.h>
29#include <sys/types.h>
30#include "attach/lib.h"
31
32struct Address;
33struct Body;
34struct Buffer;
35struct passwd;
36struct stat;
37
38void mutt_adv_mktemp_cfg(struct Buffer *buf, const char *cfg);
39#define mutt_adv_mktemp(buf) mutt_adv_mktemp_cfg(buf, "tmp_dir")
40#define mutt_adv_mktemp_draft(buf) mutt_adv_mktemp_cfg(buf, "tmp_draft_dir")
41
42void expand_path(struct Buffer *buf, bool regex);
43void pretty_mailbox(struct Buffer *s);
44void buf_sanitize_filename (struct Buffer *buf, const char *path, short slash);
45void generate_save_path(struct Buffer *dest, const struct Address *a);
46int mutt_check_overwrite(const char *attname, const char *path, struct Buffer *fname, enum SaveAttach *opt, char **directory);
47void mutt_encode_path(struct Buffer *buf, const char *src);
48char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw);
49void mutt_get_parent_path(const char *path, char *buf, size_t buflen);
50bool mutt_is_text_part(const struct Body *b);
51bool mutt_needs_mailcap(struct Body *b);
52FILE * mutt_open_read(const char *path, pid_t *thepid);
53int mutt_save_confirm(const char *s, struct stat *st);
54void mutt_sleep(short s);
55int mutt_str_pretty_size(struct Buffer *buf, size_t num);
56
57#endif /* MUTT_MUTTLIB_H */
GUI display the mailboxes in a side panel.
SaveAttach
Options for saving attachments.
Definition mutt_attach.h:57
void mutt_get_parent_path(const char *path, char *buf, size_t buflen)
Find the parent of a path (or mailbox)
Definition muttlib.c:867
char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw)
Lookup a user's real name in /etc/passwd.
Definition muttlib.c:321
int mutt_str_pretty_size(struct Buffer *buf, size_t num)
Display an abbreviated size, like 3.4K.
Definition muttlib.c:935
void mutt_sleep(short s)
Sleep for a while.
Definition muttlib.c:787
bool mutt_is_text_part(const struct Body *b)
Is this part of an email in plain text?
Definition muttlib.c:396
void pretty_mailbox(struct Buffer *s)
Shorten a mailbox path using '~' or '='.
Definition muttlib.c:428
void generate_save_path(struct Buffer *dest, const struct Address *a)
Make a safe filename from an email address.
Definition muttlib.c:608
bool mutt_needs_mailcap(struct Body *b)
Does this type need a mailcap entry do display.
Definition muttlib.c:368
void expand_path(struct Buffer *buf, bool regex)
Create the canonical path.
Definition muttlib.c:122
void buf_sanitize_filename(struct Buffer *buf, const char *path, short slash)
Replace unsafe characters in a filename.
Definition muttlib.c:913
void mutt_adv_mktemp_cfg(struct Buffer *buf, const char *cfg)
Create a temporary file.
Definition muttlib.c:84
int mutt_check_overwrite(const char *attname, const char *path, struct Buffer *fname, enum SaveAttach *opt, char **directory)
Ask the user if overwriting is necessary.
Definition muttlib.c:524
void mutt_encode_path(struct Buffer *buf, const char *src)
Convert a path to 'us-ascii'.
Definition muttlib.c:803
int mutt_save_confirm(const char *s, struct stat *st)
Ask the user to save.
Definition muttlib.c:690
FILE * mutt_open_read(const char *path, pid_t *thepid)
Run a command to read from.
Definition muttlib.c:645
An email address.
Definition address.h:35
The body of an email.
Definition body.h:36
String manipulation buffer.
Definition buffer.h:36