From 8db3fe9c19320b6f6e508d6b1aae03980239a930 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 24 May 2007 23:47:13 +0200 Subject: [PATCH] x-comment-to is useless in mutt, we can Cc: things as it's a *mailer*. Signed-off-by: Pierre Habouzit --- OPS | 1 - compose.c | 20 -------------------- functions.def | 1 - init.h | 21 --------------------- lib-mime/mime-token.def | 1 - lib-mime/mime-types.h | 1 - lib-mime/mime.cpkg | 1 - lib-mime/rfc822parse.c | 7 ------- lib-mx/hcache.c | 2 -- mutt.h | 2 -- send.c | 22 +--------------------- sendlib.c | 6 ------ 12 files changed, 1 insertion(+), 84 deletions(-) diff --git a/OPS b/OPS index 0fda7e6..514bb10 100644 --- a/OPS +++ b/OPS @@ -31,7 +31,6 @@ OP_COMPOSE_EDIT_MIME "edit attachment using mailcap entry" OP_COMPOSE_EDIT_NEWSGROUPS "edit the newsgroups list" OP_COMPOSE_EDIT_REPLY_TO "edit the Reply-To field" OP_COMPOSE_EDIT_FOLLOWUP_TO "edit the Followup-To field" -OP_COMPOSE_EDIT_X_COMMENT_TO "edit the X-Comment-To field" OP_COMPOSE_EDIT_SUBJECT "edit the subject of this message" OP_COMPOSE_EDIT_TO "edit the TO list" OP_CREATE_MAILBOX "create a new mailbox (IMAP only)" diff --git a/compose.c b/compose.c index e2c2a08..0c9802a 100644 --- a/compose.c +++ b/compose.c @@ -250,10 +250,6 @@ static void draw_envelope (HEADER * msg, char *fcc) mutt_paddstr (W, NONULL (msg->env->newsgroups)); mvprintw (HDR_CC, SW, TITLE_FMT, Prompts[HDR_FOLLOWUPTO - 1]); mutt_paddstr (W, NONULL (msg->env->followup_to)); - if (option (OPTXCOMMENTTO)) { - mvprintw (HDR_BCC, 0, TITLE_FMT, Prompts[HDR_XCOMMENTTO - 1]); - mutt_paddstr (W, NONULL (msg->env->x_comment_to)); - } } #endif mvprintw (HDR_SUBJECT, SW, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); @@ -599,22 +595,6 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ } break; - case OP_COMPOSE_EDIT_X_COMMENT_TO: - if (news && option (OPTXCOMMENTTO)) { - buf[0] = 0; - if (msg->env->x_comment_to) - m_strcpy(buf, sizeof(buf), msg->env->x_comment_to); - if (mutt_get_field ("X-Comment-To: ", buf, sizeof (buf), 0) == 0 - && buf[0]) { - p_delete(&msg->env->x_comment_to); - msg->env->x_comment_to = m_strdup(buf); - move (HDR_BCC, HDR_XOFFSET); - clrtoeol (); - if (msg->env->x_comment_to) - printw ("%-*.*s", W, W, msg->env->x_comment_to); - } - } - break; #endif case OP_COMPOSE_EDIT_SUBJECT: if (msg->env->subject) diff --git a/functions.def b/functions.def index c7d9278..931ead6 100644 --- a/functions.def +++ b/functions.def @@ -353,7 +353,6 @@ LIST(OpCompose) #ifdef USE_NNTP ITEM("edit-newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS, "N") ITEM("edit-followup-to", OP_COMPOSE_EDIT_FOLLOWUP_TO, "o") - ITEM("edit-x-comment-to", OP_COMPOSE_EDIT_X_COMMENT_TO, "x") #endif ITEM("postpone-message", OP_COMPOSE_POSTPONE_MESSAGE, "P") ITEM("edit-reply-to", OP_COMPOSE_EDIT_REPLY_TO, "r") diff --git a/init.h b/init.h index f2550a2..a7a1be2 100644 --- a/init.h +++ b/init.h @@ -171,15 +171,6 @@ struct option_t MuttVars[] = { ** If \fIset\fP, Madmutt will prompt you for the \fTFollowup-To:\fP header ** field before editing the body of an outgoing news article. */ - {"nntp_ask_x_comment_to", DT_BOOL, R_NONE, OPTASKXCOMMENTTO, "no" }, - /* - ** .pp - ** Availability: NNTP - ** - ** .pp - ** If \fIset\fP, Madmutt will prompt you for the \fTX-Comment-To:\fP header - ** field before editing the body of an outgoing news article. - */ #endif {"attach_format", DT_STR, R_NONE, UL &AttachFormat, "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "}, /* @@ -2491,18 +2482,6 @@ struct option_t MuttVars[] = { ** $$xterm_set_titles has been \fIset\fP. This string is identical in formatting ** to the one used by ``$$status_format''. */ -#ifdef USE_NNTP - {"nntp_x_comment_to", DT_BOOL, R_NONE, OPTXCOMMENTTO, "no" }, - /* - ** .pp - ** Availability: NNTP - ** - ** .pp - ** If \fIset\fP, Madmutt will add a ``\fTX-Comment-To:\fP'' header field - ** (that contains full name of the original article author) to articles that - ** you followup to. - */ -#endif /*--*/ { NULL, -1, R_NONE, -1, NULL } }; diff --git a/lib-mime/mime-token.def b/lib-mime/mime-token.def index 86f993e..39a3a2a 100644 --- a/lib-mime/mime-token.def +++ b/lib-mime/mime-token.def @@ -91,7 +91,6 @@ unknown us-ascii utf-8 video -x-comment-to x-convert x-label x-mutt-deleted diff --git a/lib-mime/mime-types.h b/lib-mime/mime-types.h index 6f8c4b7..daf1ce2 100644 --- a/lib-mime/mime-types.h +++ b/lib-mime/mime-types.h @@ -137,7 +137,6 @@ typedef struct envelope_t { char *newsgroups; char *xref; char *followup_to; - char *x_comment_to; #endif BUFFER *spam; string_list_t *references; /* message references (in reverse order) */ diff --git a/lib-mime/mime.cpkg b/lib-mime/mime.cpkg index 86704dc..ddb7a14 100644 --- a/lib-mime/mime.cpkg +++ b/lib-mime/mime.cpkg @@ -292,7 +292,6 @@ void envelope_wipe(ENVELOPE *p) p_delete(&p->newsgroups); p_delete(&p->xref); p_delete(&p->followup_to); - p_delete(&p->x_comment_to); #endif mutt_buffer_free (&p->spam); diff --git a/lib-mime/rfc822parse.c b/lib-mime/rfc822parse.c index b1a2d39..40c84f5 100644 --- a/lib-mime/rfc822parse.c +++ b/lib-mime/rfc822parse.c @@ -911,13 +911,6 @@ string_list_t **mutt_parse_rfc822_line(ENVELOPE *e, HEADER *hdr, char *line, cha e->to = rfc822_parse_adrlist(e->to, p); break; -#ifdef USE_NNTP - case MIME_X_COMMENT_TO: - if (!e->x_comment_to) - e->x_comment_to = m_strdup(p); - break; -#endif - case MIME_X_LABEL: e->x_label = m_strdup(p); break; diff --git a/lib-mx/hcache.c b/lib-mx/hcache.c index 76e4a83..e59e43a 100644 --- a/lib-mx/hcache.c +++ b/lib-mx/hcache.c @@ -281,7 +281,6 @@ static void dump_envelope(buffer_t *buf, ENVELOPE * e) dump_cstr(buf, e->newsgroups); dump_cstr(buf, e->xref); dump_cstr(buf, e->followup_to); - dump_cstr(buf, e->x_comment_to); #endif dump_list(buf, e->references); @@ -319,7 +318,6 @@ static const void *restore_envelope(const char *d, ENVELOPE *e) d = restore_cstr(d, &e->newsgroups); d = restore_cstr(d, &e->xref); d = restore_cstr(d, &e->followup_to); - d = restore_cstr(d, &e->x_comment_to); #endif d = restore_list(d, &e->references); diff --git a/mutt.h b/mutt.h index c7913e0..25e5613 100644 --- a/mutt.h +++ b/mutt.h @@ -205,7 +205,6 @@ enum { OPTASKBCC, OPTASKCC, OPTASKFOLLOWUP, - OPTASKXCOMMENTTO, OPTATTACHSPLIT, OPTAUTOEDIT, OPTAUTOTAG, @@ -318,7 +317,6 @@ enum { OPTSHOWONLYUNREAD, OPTSAVEUNSUB, OPTLOADDESC, - OPTXCOMMENTTO, #endif /* USE_NNTP */ /* pseudo options */ diff --git a/send.c b/send.c index db26a3d..aa23162 100644 --- a/send.c +++ b/send.c @@ -265,18 +265,7 @@ static int edit_envelope (ENVELOPE * en, int flags) return (-1); p_delete(&en->followup_to); en->followup_to = m_strdup(buf); - - if (en->x_comment_to) - m_strcpy(buf, sizeof(buf), en->x_comment_to); - else - buf[0] = 0; - if (option (OPTXCOMMENTTO) && option (OPTASKXCOMMENTTO) - && mutt_get_field ("X-Comment-To: ", buf, sizeof (buf), 0) != 0) - return (-1); - p_delete(&en->x_comment_to); - en->x_comment_to = m_strdup(buf); - } - else + } else #endif { if (edit_address (&en->to, "To: ") == -1 || en->to == NULL) @@ -368,9 +357,6 @@ static void process_user_recips (ENVELOPE * env) case MIME_FOLLOWUP_TO: env->followup_to = nntp_get_header(p); break; - case MIME_X_COMMENT_TO: - env->x_comment_to = nntp_get_header(p); - break; #endif default: break; } @@ -409,7 +395,6 @@ static void process_user_header(ENVELOPE * env) #ifdef USE_NNTP case MIME_NEWSGROUPS: case MIME_FOLLOWUP_TO: - case MIME_X_COMMENT_TO: #endif case MIME_SUPERSEDES: case MIME_SUPERCEDES: @@ -660,11 +645,6 @@ void mutt_make_misc_reply_headers (ENVELOPE * env, } else if (!env->subject) env->subject = m_strdup("Re: your mail"); - -#ifdef USE_NNTP - if (option (OPTNEWSSEND) && option (OPTXCOMMENTTO) && curenv->from) - env->x_comment_to = m_strdup(mutt_get_name (curenv->from)); -#endif } static string_list_t *mutt_make_references (ENVELOPE * e) diff --git a/sendlib.c b/sendlib.c index 49d4140..6ba421a 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1416,12 +1416,6 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach, fprintf (fp, "Followup-To: %s\n", env->followup_to); else if (mode == 1 && option (OPTNEWSSEND) && edit_header(mode, "Followup-To:")) fputs ("Followup-To:\n", fp); - - if (env->x_comment_to) - fprintf (fp, "X-Comment-To: %s\n", env->x_comment_to); - else if (mode == 1 && option (OPTNEWSSEND) && option (OPTXCOMMENTTO) && - edit_header(mode, "X-Comment-To:")) - fputs ("X-Comment-To:\n", fp); #endif if (env->subject) -- 2.20.1