]> granicus.if.org Git - neomutt/blob - hdrline.h
Fix mutt_write_mime_body() application/pgp-encrypted handling
[neomutt] / hdrline.h
1 /**
2  * @file
3  * String processing routines to generate the mail index
4  *
5  * @authors
6  * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
7  * Copyright (C) 2019 Pietro Cerutti <gahr@gahr.ch>
8  *
9  * @copyright
10  * This program is free software: you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation, either version 2 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program.  If not, see <http://www.gnu.org/licenses/>.
22  */
23
24 #ifndef MUTT_HDRLINE_H
25 #define MUTT_HDRLINE_H
26
27 #include <stdbool.h>
28 #include <stdio.h>
29 #include "format_flags.h"
30
31 struct Address;
32 struct Context;
33 struct Email;
34 struct Mailbox;
35
36 /* These Config Variables are only used in hdrline.c */
37 extern struct MbTable *C_CryptChars;
38 extern struct MbTable *C_FlagChars;
39 extern struct MbTable *C_FromChars;
40 extern struct MbTable *C_ToChars;
41
42 /**
43  * struct HdrFormatInfo - Data passed to index_format_str()
44  */
45 struct HdrFormatInfo
46 {
47   struct Context *ctx;
48   struct Mailbox *mailbox;
49   struct Email *email;
50   const char *pager_progress;
51 };
52
53 bool mutt_is_mail_list(const struct Address *addr);
54 bool mutt_is_subscribed_list(const struct Address *addr);
55 void mutt_make_string_flags(char *buf, size_t buflen, const char *s,
56                             struct Context *ctx, struct Mailbox *m,
57                             struct Email *e, MuttFormatFlags flags);
58 void mutt_make_string_info(char *buf, size_t buflen, int cols, const char *s,
59                            struct HdrFormatInfo *hfi, MuttFormatFlags flags);
60
61 #define mutt_make_string(BUF, BUFLEN, S, CTX, M, E)                            \
62   mutt_make_string_flags(BUF, BUFLEN, S, CTX, M, E, 0)
63
64 #endif /* MUTT_HDRLINE_H */