summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-01-29 15:09:59 -0800
committerKevin McCarthy <kevin@8t8.us>2020-02-28 11:57:38 -0800
commit8bf37106fd4ec9b2ef122711ac2938564688ec5e (patch)
tree9f7557c01ff9ed34eee3b8df1217a1c2a6320347
parent9c1f1e48e8a8d4331f5ccf3733dda6e8cfe6bde8 (diff)
Create send.h header.
This will hold the send context, so we may as well pull the prototypes into the header file too.
-rw-r--r--Makefile.am2
-rw-r--r--autocrypt/autocrypt.c1
-rw-r--r--curs_main.c1
-rw-r--r--group.c1
-rw-r--r--main.c2
-rw-r--r--pager.c2
-rw-r--r--protos.h18
-rw-r--r--query.c1
-rw-r--r--recvcmd.c1
-rw-r--r--send.c5
-rw-r--r--send.h39
-rw-r--r--sendlib.c1
-rw-r--r--smime.c1
13 files changed, 54 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index e46f6544..b973b557 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -77,7 +77,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \
_mutt_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \
- README.SSL smime.h group.h mutt_zstrm.h \
+ README.SSL smime.h group.h mutt_zstrm.h send.h \
muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
ChangeLog mkchangelog.sh mkreldate.sh mutt_idna.h sidebar.h OPS.SIDEBAR \
snprintf.c regex.c crypt-gpgme.h hcachever.pl \
diff --git a/autocrypt/autocrypt.c b/autocrypt/autocrypt.c
index 7a3be260..628f0d46 100644
--- a/autocrypt/autocrypt.c
+++ b/autocrypt/autocrypt.c
@@ -26,6 +26,7 @@
#include "mime.h"
#include "mutt_idna.h"
#include "mailbox.h"
+#include "send.h"
#include "autocrypt.h"
#include "autocrypt_private.h"
diff --git a/curs_main.c b/curs_main.c
index 6f833a81..fe83bd40 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -28,6 +28,7 @@
#include "sort.h"
#include "buffy.h"
#include "mx.h"
+#include "send.h"
#ifdef USE_SIDEBAR
#include "sidebar.h"
diff --git a/group.c b/group.c
index f37f52a0..1bcd3793 100644
--- a/group.c
+++ b/group.c
@@ -26,6 +26,7 @@
#include "mutt_regex.h"
#include "mbyte.h"
#include "charset.h"
+#include "send.h"
#include <ctype.h>
#include <stdlib.h>
diff --git a/main.c b/main.c
index 413c44de..3c3e22de 100644
--- a/main.c
+++ b/main.c
@@ -31,6 +31,8 @@
#include "url.h"
#include "mutt_crypt.h"
#include "mutt_idna.h"
+#include "send.h"
+
#ifdef USE_SIDEBAR
#include "sidebar.h"
#endif
diff --git a/pager.c b/pager.c
index 4e29c289..65678bb4 100644
--- a/pager.c
+++ b/pager.c
@@ -31,6 +31,8 @@
#include "mbyte.h"
#include "sort.h"
#include "buffy.h"
+#include "send.h"
+
#ifdef USE_SIDEBAR
#include "sidebar.h"
#endif
diff --git a/protos.h b/protos.h
index 3f271c30..c8c79428 100644
--- a/protos.h
+++ b/protos.h
@@ -82,11 +82,9 @@ int quadoption (int);
char* mutt_extract_message_id (const char *, const char **);
-ADDRESS *mutt_default_from (void);
ADDRESS *mutt_get_address (ENVELOPE *, char **);
ADDRESS *mutt_lookup_alias (const char *s);
ADDRESS *mutt_remove_duplicates (ADDRESS *);
-ADDRESS *mutt_remove_xrefs (ADDRESS *, ADDRESS *);
ADDRESS *mutt_expand_aliases (ADDRESS *);
ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
@@ -108,8 +106,6 @@ CONTENT *mutt_get_content_info (const char *fname, BODY *b);
HASH *mutt_make_id_hash (CONTEXT *);
HASH *mutt_make_subj_hash (CONTEXT *);
-LIST *mutt_make_references(ENVELOPE *e);
-
char *mutt_read_rfc822_line (FILE *, char *, size_t *);
ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short, short);
HEADER *mutt_dup_header (HEADER *);
@@ -166,7 +162,6 @@ group_t *mutt_pattern_group (const char *);
REGEXP *mutt_compile_regexp (const char *, int);
void mutt_account_hook (const char* url);
-void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, LIST ***qq);
void mutt_adv_mktemp (BUFFER *);
void mutt_alias_menu (char *, size_t, ALIAS *);
void mutt_allow_interrupt (int);
@@ -208,7 +203,6 @@ void mutt_label_hash_remove (CONTEXT *ctx, HEADER *hdr);
int mutt_label_complete (char *, size_t, int);
void mutt_curses_error (const char *, ...);
void mutt_curses_message (const char *, ...);
-void mutt_encode_descriptions (BODY *, short);
void mutt_encode_path (BUFFER *, const char *);
void mutt_enter_command (void);
void mutt_error_history_display (void);
@@ -216,13 +210,10 @@ void mutt_error_history_init (void);
void mutt_expand_aliases_env (ENVELOPE *);
void mutt_expand_file_fmt (BUFFER *, const char *, const char *);
void mutt_expand_fmt (BUFFER *, const char *, const char *);
-void mutt_fix_reply_recipients (ENVELOPE *env);
void mutt_folder_hook (const char *);
void mutt_format_string (char *, size_t, int, int, int, char, const char *, size_t, int);
void mutt_format_s (char *, size_t, const char *, const char *);
void mutt_format_s_tree (char *, size_t, const char *, const char *);
-void mutt_forward_intro (CONTEXT *ctx, HEADER *cur, FILE *fp);
-void mutt_forward_trailer (CONTEXT *ctx, HEADER *cur, FILE *fp);
void mutt_free_alias (ALIAS **);
#ifdef USE_AUTOCRYPT
void mutt_free_autocrypthdr (AUTOCRYPTHDR **p);
@@ -240,11 +231,7 @@ void mutt_help (int);
const char *mutt_idxfmt_hook (const char *, CONTEXT *, HEADER *);
void mutt_draw_tree (CONTEXT *);
void mutt_check_lookup_list (BODY *, char *, size_t);
-void mutt_make_attribution (CONTEXT *ctx, HEADER *cur, FILE *out);
-void mutt_make_forward_subject (ENVELOPE *env, CONTEXT *ctx, HEADER *cur);
void mutt_make_help (char *, size_t, const char *, int, int);
-void mutt_make_misc_reply_headers (ENVELOPE *env, CONTEXT *ctx, HEADER *cur, ENVELOPE *curenv);
-void mutt_make_post_indent (CONTEXT *ctx, HEADER *cur, FILE *out);
void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra);
void mutt_message_to_7bit (BODY *, FILE *);
#define mutt_buffer_mktemp(a) mutt_buffer_mktemp_pfx_sfx (a, "mutt", NULL)
@@ -281,7 +268,6 @@ void _mutt_buffer_select_file (BUFFER *, int, char ***, int *);
void mutt_message_hook (CONTEXT *, HEADER *, int);
void _mutt_set_flag (CONTEXT *, HEADER *, int, int, int);
#define mutt_set_flag(a,b,c,d) _mutt_set_flag(a,b,c,d,1)
-void mutt_set_followup_to (ENVELOPE *);
void mutt_shell_escape (void);
void mutt_show_error (void);
void mutt_signal_init (void);
@@ -326,15 +312,12 @@ int mutt_decode_save_attachment (FILE *, BODY *, const char *, int, int);
int mutt_display_message (HEADER *h);
int mutt_dump_variables (void);
int mutt_edit_attachment(BODY *);
-int mutt_edit_address (ADDRESS **, const char *, int);
int mutt_edit_message (CONTEXT *, HEADER *);
-int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags);
int mutt_chscmp (const char *s, const char *chs);
#define mutt_is_utf8(a) mutt_chscmp (a, "utf-8")
#define mutt_is_us_ascii(a) mutt_chscmp (a, "us-ascii")
int mutt_parent_message (CONTEXT *, HEADER *, int);
int mutt_prepare_template(FILE*, CONTEXT *, HEADER *, HEADER *, short);
-int mutt_resend_message (FILE *, CONTEXT *, HEADER *);
#define mutt_buffer_enter_fname(A,B,C) _mutt_buffer_enter_fname(A,B,C,0,NULL,NULL)
int _mutt_buffer_enter_fname (const char *, BUFFER *, int, int, char ***, int *);
#define mutt_enter_fname(A,B,C,D) _mutt_enter_fname(A,B,C,D,0,NULL,NULL)
@@ -580,7 +563,6 @@ int ioctl (int, int, ...);
/* unsorted */
void ci_bounce_message (HEADER *);
-int ci_send_message (int, HEADER *, const char *, CONTEXT *, HEADER *);
/* prototypes for compatibility functions */
diff --git a/query.c b/query.c
index 2d647ef2..741c3762 100644
--- a/query.c
+++ b/query.c
@@ -24,6 +24,7 @@
#include "mutt_menu.h"
#include "mutt_idna.h"
#include "mapping.h"
+#include "send.h"
#include <string.h>
#include <stdlib.h>
diff --git a/recvcmd.c b/recvcmd.c
index 9bf3c3b0..566f1d97 100644
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -30,6 +30,7 @@
#include "mapping.h"
#include "copy.h"
#include "mutt_idna.h"
+#include "send.h"
/* some helper functions to verify that we are exclusively operating
* on message/rfc822 attachments
diff --git a/send.c b/send.c
index 11e94b1b..709e89f4 100644
--- a/send.c
+++ b/send.c
@@ -32,6 +32,7 @@
#include "url.h"
#include "rfc3676.h"
#include "attach.h"
+#include "send.h"
#ifdef USE_AUTOCRYPT
#include "autocrypt.h"
@@ -468,7 +469,7 @@ cleanup:
return rc;
}
-int mutt_inline_forward (CONTEXT *ctx, HEADER *msg, HEADER *cur, FILE *out)
+static int mutt_inline_forward (CONTEXT *ctx, HEADER *msg, HEADER *cur, FILE *out)
{
int i, forwardq = -1;
BODY **last;
@@ -689,7 +690,7 @@ int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags)
return 0;
}
-LIST *mutt_make_references(ENVELOPE *e)
+static LIST *mutt_make_references(ENVELOPE *e)
{
LIST *t = NULL, *l = NULL;
diff --git a/send.h b/send.h
new file mode 100644
index 00000000..e809e0cd
--- /dev/null
+++ b/send.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 Kevin J. McCarthy <kevin@8t8.us>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _SEND_H
+#define _SEND_H 1
+
+ADDRESS *mutt_remove_xrefs (ADDRESS *, ADDRESS *);
+int mutt_edit_address (ADDRESS **, const char *, int);
+void mutt_forward_intro (CONTEXT *ctx, HEADER *cur, FILE *fp);
+void mutt_forward_trailer (CONTEXT *ctx, HEADER *cur, FILE *fp);
+void mutt_make_attribution (CONTEXT *ctx, HEADER *cur, FILE *out);
+void mutt_make_post_indent (CONTEXT *ctx, HEADER *cur, FILE *out);
+int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags);
+void mutt_fix_reply_recipients (ENVELOPE *env);
+void mutt_make_forward_subject (ENVELOPE *env, CONTEXT *ctx, HEADER *cur);
+void mutt_make_misc_reply_headers (ENVELOPE *env, CONTEXT *ctx, HEADER *cur, ENVELOPE *curenv);
+void mutt_add_to_reference_headers (ENVELOPE *env, ENVELOPE *curenv, LIST ***pp, LIST ***qq);
+void mutt_set_followup_to (ENVELOPE *);
+ADDRESS *mutt_default_from (void);
+void mutt_encode_descriptions (BODY *, short);
+int mutt_resend_message (FILE *, CONTEXT *, HEADER *);
+int ci_send_message (int, HEADER *, const char *, CONTEXT *, HEADER *);
+
+#endif
diff --git a/sendlib.c b/sendlib.c
index 3422d0aa..3bc1553f 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -36,6 +36,7 @@
#include "mutt_crypt.h"
#include "mutt_idna.h"
#include "buffy.h"
+#include "send.h"
#ifdef USE_AUTOCRYPT
#include "autocrypt.h"
diff --git a/smime.c b/smime.c
index 0ee56535..8ed33008 100644
--- a/smime.c
+++ b/smime.c
@@ -28,6 +28,7 @@
#include "smime.h"
#include "mime.h"
#include "copy.h"
+#include "send.h"
#include <sys/wait.h>
#include <string.h>