Skip to content

Commit

Permalink
replace 'HEADER' with 'struct Header'
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed May 15, 2017
1 parent 2053723 commit 979202a
Show file tree
Hide file tree
Showing 72 changed files with 450 additions and 450 deletions.
10 changes: 5 additions & 5 deletions attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void mutt_check_lookup_list(struct Body *b, char *type, int len)
}

/* returns -1 on error, 0 or the return code from mutt_do_pager() on success */
int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr, struct AttachPtr **idx, short idxlen)
int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr, struct AttachPtr **idx, short idxlen)
{
char tempfile[_POSIX_PATH_MAX] = "";
char pagerfile[_POSIX_PATH_MAX] = "";
Expand Down Expand Up @@ -692,7 +692,7 @@ static FILE *save_attachment_open(char *path, int flags)
}

/* returns 0 on success, -1 on error */
int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER *hdr)
int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, struct Header *hdr)
{
if (!m)
return -1;
Expand All @@ -707,7 +707,7 @@ int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER
/* message type attachments are written to mail folders. */

char buf[HUGE_STRING];
HEADER *hn = NULL;
struct Header *hn = NULL;
struct Context ctx;
MESSAGE *msg = NULL;
int chflags = 0;
Expand Down Expand Up @@ -811,7 +811,7 @@ int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displa
STATE s;
unsigned int saved_encoding = 0;
struct Body *saved_parts = NULL;
HEADER *saved_hdr = NULL;
struct Header *saved_hdr = NULL;
int ret = 0;

memset(&s, 0, sizeof(s));
Expand Down Expand Up @@ -892,7 +892,7 @@ int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displa
}

/* Ok, the difference between send and receive:
* recv: Body->filename is a suggested name, and Context|HEADER points
* recv: Body->filename is a suggested name, and Context|Header points
* to the attachment in mailbox which is encoded
* send: Body->filename points to the un-encoded file which contains the
* attachment
Expand Down
14 changes: 7 additions & 7 deletions attach.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ struct AttachPtr
struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type, struct AttachPtr **idx,
short *idxlen, short *idxmax, int level, int compose);
void mutt_update_tree(struct AttachPtr **idx, short idxlen);
int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr,
int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
struct AttachPtr **idx, short idxlen);

int mutt_tag_attach(MUTTMENU *menu, int n, int m);
int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, struct Body *cur,
int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, struct Header *hdr, struct Body *cur,
struct AttachPtr ***idxp, short *idxlen, short *idxmax, int recv);

void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, HEADER *hdr, MUTTMENU *menu);
void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, struct Header *hdr, MUTTMENU *menu);
void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter);
void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top);

void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
void mutt_attach_forward(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
void mutt_attach_bounce(FILE *fp, struct Header *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
void mutt_attach_resend(FILE *fp, struct Header *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
void mutt_attach_forward(FILE *fp, struct Header *hdr, struct AttachPtr **idx, short idxlen,
struct Body *cur, int flags);
void mutt_attach_reply(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx, short idxlen,
struct Body *cur, int flags);

#endif /* _MUTT_ATTACH_H */
2 changes: 1 addition & 1 deletion buffy.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int fseek_last_message(FILE *f)
/* Return 1 if the last message is new */
static int test_last_status_new(FILE *f)
{
HEADER *hdr = NULL;
struct Header *hdr = NULL;
struct Envelope *tmp_envelope = NULL;
int result = 0;

Expand Down
26 changes: 13 additions & 13 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const char *ExtPagerProgress = "all";
/* The folder the user last saved to. Used by ci_save_message() */
static char LastSaveFolder[_POSIX_PATH_MAX] = "";

int mutt_display_message(HEADER *cur)
int mutt_display_message(struct Header *cur)
{
char tempfile[_POSIX_PATH_MAX], buf[LONG_STRING];
int rc = 0, builtin = 0;
Expand Down Expand Up @@ -238,7 +238,7 @@ int mutt_display_message(HEADER *cur)
return rc;
}

void ci_bounce_message(HEADER *h)
void ci_bounce_message(struct Header *h)
{
char prompt[SHORT_STRING];
char scratch[SHORT_STRING];
Expand Down Expand Up @@ -346,7 +346,7 @@ static void pipe_set_flags(int decode, int print, int *cmflags, int *chflags)
*cmflags |= MUTT_CM_PRINTING;
}

static void pipe_msg(HEADER *h, FILE *fp, int decode, int print)
static void pipe_msg(struct Header *h, FILE *fp, int decode, int print)
{
int cmflags = 0;
int chflags = CH_FROM;
Expand All @@ -368,7 +368,7 @@ static void pipe_msg(HEADER *h, FILE *fp, int decode, int print)


/* the following code is shared between printing and piping */
static int _mutt_pipe_message(HEADER *h, char *cmd, int decode, int print,
static int _mutt_pipe_message(struct Header *h, char *cmd, int decode, int print,
int split, char *sep)
{
int i, rc = 0;
Expand Down Expand Up @@ -472,7 +472,7 @@ static int _mutt_pipe_message(HEADER *h, char *cmd, int decode, int print,
return rc;
}

void mutt_pipe_message(HEADER *h)
void mutt_pipe_message(struct Header *h)
{
char buffer[LONG_STRING];

Expand All @@ -485,7 +485,7 @@ void mutt_pipe_message(HEADER *h)
_mutt_pipe_message(h, buffer, option(OPTPIPEDECODE), 0, option(OPTPIPESPLIT), PipeSep);
}

void mutt_print_message(HEADER *h)
void mutt_print_message(struct Header *h)
{
if (quadoption(OPT_PRINT) && (!PrintCmd || !*PrintCmd))
{
Expand Down Expand Up @@ -650,7 +650,7 @@ void mutt_display_address(struct Envelope *env)
mutt_message("%s: %s", pfx, buf);
}

static void set_copy_flags(HEADER *hdr, int decode, int decrypt, int *cmflags, int *chflags)
static void set_copy_flags(struct Header *hdr, int decode, int decrypt, int *cmflags, int *chflags)
{
*cmflags = 0;
*chflags = CH_UPDATE_LEN;
Expand Down Expand Up @@ -690,7 +690,7 @@ static void set_copy_flags(HEADER *hdr, int decode, int decrypt, int *cmflags, i
}
}

int _mutt_save_message(HEADER *h, struct Context *ctx, int delete, int decode, int decrypt)
int _mutt_save_message(struct Header *h, struct Context *ctx, int delete, int decode, int decrypt)
{
int cmflags, chflags;
int rc;
Expand All @@ -715,7 +715,7 @@ int _mutt_save_message(HEADER *h, struct Context *ctx, int delete, int decode, i
}

/* returns 0 if the copy/save was successful, or -1 on error/abort */
int mutt_save_message(HEADER *h, int delete, int decode, int decrypt)
int mutt_save_message(struct Header *h, int delete, int decode, int decrypt)
{
int i, need_buffy_cleanup;
int need_passphrase = 0, app = 0;
Expand Down Expand Up @@ -864,7 +864,7 @@ int mutt_save_message(HEADER *h, int delete, int decode, int decrypt)
#ifdef USE_COMPRESSED
if (cm)
{
HEADER *h2 = Context->hdrs[Context->v2r[i]];
struct Header *h2 = Context->hdrs[Context->v2r[i]];
cm->msg_count++;
if (!h2->read)
cm->msg_unread++;
Expand Down Expand Up @@ -905,7 +905,7 @@ void mutt_version(void)
mutt_message("NeoMutt %s%s (%s)", PACKAGE_VERSION, GitVer, MUTT_VERSION);
}

void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp)
void mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp)
{
char buf[LONG_STRING];
char obuf[LONG_STRING];
Expand Down Expand Up @@ -999,7 +999,7 @@ void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp)
}


static int _mutt_check_traditional_pgp(HEADER *h, int *redraw)
static int _mutt_check_traditional_pgp(struct Header *h, int *redraw)
{
MESSAGE *msg = NULL;
int rv = 0;
Expand All @@ -1021,7 +1021,7 @@ static int _mutt_check_traditional_pgp(HEADER *h, int *redraw)
return rv;
}

int mutt_check_traditional_pgp(HEADER *h, int *redraw)
int mutt_check_traditional_pgp(struct Header *h, int *redraw)
{
int i;
int rv = 0;
Expand Down
12 changes: 6 additions & 6 deletions compose.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void snd_entry(char *b, size_t blen, MUTTMENU *menu, int num)

#include "mutt_crypt.h"

static void redraw_crypt_lines(HEADER *msg)
static void redraw_crypt_lines(struct Header *msg)
{
SETCOLOR(MT_COLOR_COMPOSE_HEADER);
mutt_window_mvprintw(MuttIndexWindow, HDR_CRYPT, 0, TITLE_FMT, "Security: ");
Expand Down Expand Up @@ -294,7 +294,7 @@ static void draw_envelope_addr(int line, struct Address *addr)
mutt_paddstr(W, buf);
}

static void draw_envelope(HEADER *msg, char *fcc)
static void draw_envelope(struct Header *msg, char *fcc)
{
draw_envelope_addr(HDR_FROM, msg->env->from);
#ifdef USE_NNTP
Expand Down Expand Up @@ -427,7 +427,7 @@ static void update_idx(MUTTMENU *menu, struct AttachPtr **idx, short idxlen)

typedef struct
{
HEADER *msg;
struct Header *msg;
char *fcc;
} compose_redraw_data_t;

Expand Down Expand Up @@ -595,9 +595,9 @@ static void compose_status_line(char *buf, size_t buflen, size_t col, int cols,
* 0 normal exit
* -1 abort message
*/
int mutt_compose_menu(HEADER *msg, /* structure for new message */
int mutt_compose_menu(struct Header *msg, /* structure for new message */
char *fcc, /* where to save a copy of the message */
size_t fcclen, HEADER *cur, /* current message */
size_t fcclen, struct Header *cur, /* current message */
int flags)
{
char helpstr[LONG_STRING];
Expand Down Expand Up @@ -919,7 +919,7 @@ int mutt_compose_menu(HEADER *msg, /* structure for new message */
#endif
{
char *prompt = NULL;
HEADER *h = NULL;
struct Header *h = NULL;

fname[0] = 0;
prompt = _("Open mailbox to attach message from");
Expand Down
2 changes: 1 addition & 1 deletion compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ static int comp_commit_message(struct Context *ctx, MESSAGE *msg)
/**
* comp_open_new_message - Delegated to mbox handler
*/
static int comp_open_new_message(MESSAGE *msg, struct Context *ctx, HEADER *hdr)
static int comp_open_new_message(MESSAGE *msg, struct Context *ctx, struct Header *hdr)
{
if (!ctx)
return -1;
Expand Down
12 changes: 6 additions & 6 deletions copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int address_header_decode(char **str);
static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *date);

/* Ok, the only reason for not merging this with mutt_copy_header()
* below is to avoid creating a HEADER structure in message_handler().
* below is to avoid creating a Header structure in message_handler().
* Also, this one will wrap headers much more aggressively than the other one.
*/
int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
Expand Down Expand Up @@ -342,7 +342,7 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
prefix
string to use if CH_PREFIX is set
*/
int mutt_copy_header(FILE *in, HEADER *h, FILE *out, int flags, const char *prefix)
int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const char *prefix)
{
char buffer[SHORT_STRING];

Expand Down Expand Up @@ -510,7 +510,7 @@ static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t d
* MUTT_CM_CHARCONV perform character set conversion
* chflags flags to mutt_copy_header()
*/
int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body, int flags, int chflags)
int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body *body, int flags, int chflags)
{
char prefix[SHORT_STRING];
STATE s;
Expand Down Expand Up @@ -713,7 +713,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body,

/* should be made to return -1 on fatal errors, and 1 on non-fatal errors
* like partial decode, where it is worth displaying as much as possible */
int mutt_copy_message(FILE *fpout, struct Context *src, HEADER *hdr, int flags, int chflags)
int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr, int flags, int chflags)
{
MESSAGE *msg = NULL;
int r;
Expand Down Expand Up @@ -741,7 +741,7 @@ int mutt_copy_message(FILE *fpout, struct Context *src, HEADER *hdr, int flags,
* chflags mutt_copy_header() flags
*/
static int _mutt_append_message(struct Context *dest, FILE *fpin, struct Context *src,
HEADER *hdr, struct Body *body, int flags, int chflags)
struct Header *hdr, struct Body *body, int flags, int chflags)
{
char buf[STRING];
MESSAGE *msg = NULL;
Expand Down Expand Up @@ -770,7 +770,7 @@ static int _mutt_append_message(struct Context *dest, FILE *fpin, struct Context
return r;
}

int mutt_append_message(struct Context *dest, struct Context *src, HEADER *hdr, int cmflags, int chflags)
int mutt_append_message(struct Context *dest, struct Context *src, struct Header *hdr, int cmflags, int chflags)
{
MESSAGE *msg = NULL;
int r;
Expand Down
8 changes: 4 additions & 4 deletions copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
int flags, const char *prefix);

int mutt_copy_header(FILE *in, HEADER *h, FILE *out, int flags, const char *prefix);
int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const char *prefix);

int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body,
int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body *body,
int flags, int chflags);

int mutt_copy_message(FILE *fpout, struct Context *src, HEADER *hdr, int flags, int chflags);
int mutt_copy_message(FILE *fpout, struct Context *src, struct Header *hdr, int flags, int chflags);

int mutt_append_message(struct Context *dest, struct Context *src, HEADER *hdr, int cmflags, int chflags);
int mutt_append_message(struct Context *dest, struct Context *src, struct Header *hdr, int cmflags, int chflags);

#endif /* _MUTT_COPY_H */
8 changes: 4 additions & 4 deletions crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int crypt_valid_passphrase(int flags)
}


int mutt_protect(HEADER *msg, char *keylist)
int mutt_protect(struct Header *msg, char *keylist)
{
struct Body *pbody = NULL, *tmp_pbody = NULL;
struct Body *tmp_smime_pbody = NULL;
Expand Down Expand Up @@ -660,7 +660,7 @@ void convert_to_7bit(struct Body *a)
}


void crypt_extract_keys_from_messages(HEADER *h)
void crypt_extract_keys_from_messages(struct Header *h)
{
int i;
char tempfname[_POSIX_PATH_MAX], *mbox = NULL;
Expand Down Expand Up @@ -781,7 +781,7 @@ void crypt_extract_keys_from_messages(HEADER *h)
}


int crypt_get_keys(HEADER *msg, char **keylist, int oppenc_mode)
int crypt_get_keys(struct Header *msg, char **keylist, int oppenc_mode)
{
struct Address *adrlist = NULL, *last = NULL;
const char *fqdn = mutt_fqdn(1);
Expand Down Expand Up @@ -837,7 +837,7 @@ int crypt_get_keys(HEADER *msg, char **keylist, int oppenc_mode)
* Check if all recipients keys can be automatically determined.
* Enable encryption if they can, otherwise disable encryption.
*/
void crypt_opportunistic_encrypt(HEADER *msg)
void crypt_opportunistic_encrypt(struct Header *msg)
{
char *pgpkeylist = NULL;

Expand Down
Loading

0 comments on commit 979202a

Please sign in to comment.