summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/conf.c32
-rw-r--r--pith/conf.h13
-rw-r--r--pith/conftype.h8
-rw-r--r--pith/filter.c7
-rw-r--r--pith/filter.h2
-rw-r--r--pith/handle.h1
-rw-r--r--pith/mailindx.c20
-rw-r--r--pith/mailindx.h1
-rw-r--r--pith/pine.hlp183
-rw-r--r--pith/reply.c33
-rw-r--r--pith/state.c3
-rw-r--r--pith/state.h3
12 files changed, 293 insertions, 13 deletions
diff --git a/pith/conf.c b/pith/conf.c
index 1375b8dc..18eaf8f0 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -198,6 +198,8 @@ CONF_TXT_T cf_text_titlebar_color_style[] = "Controls display of color for the t
CONF_TXT_T cf_text_view_hdr_color[] = "When viewing messages, these are the header colors";
+CONF_TXT_T cf_text_index_token_color[] = "Colors in which tokens will be displayed in the index screen";
+
CONF_TXT_T cf_text_save_msg_name_rule[] = "Determines default folder name for Saves...\n# Choices: default-folder, by-sender, by-from, by-recipient, last-folder-used.\n# Default: \"default-folder\", i.e. \"saved-messages\" (Unix) or \"SAVEMAIL\" (PC).";
CONF_TXT_T cf_text_fcc_name_rule[] = "Determines default name for Fcc...\n# Choices: default-fcc, by-recipient, last-fcc-used.\n# Default: \"default-fcc\" (see also \"default-fcc=\" variable.)";
@@ -789,6 +791,12 @@ static struct variable variables[] = {
{"title-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"title-closed-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"title-closed-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"folder-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"folder-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"directory-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"directory-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"folder-list-text-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"folder-list-text-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"status-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"status-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"keylabel-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
@@ -841,6 +849,8 @@ static struct variable variables[] = {
{"index-from-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"index-opening-foreground-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
{"index-opening-background-color", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0},
+{"index-token-colors", 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,
+ NULL, cf_text_index_token_color},
{"viewer-hdr-colors", 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,
"Viewer Header Colors", cf_text_view_hdr_color},
{"keyword-colors", 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,
@@ -1651,6 +1661,9 @@ init_vars(struct pine *ps, void (*cmds_f) (struct pine *, char **))
GLO_TITLE_BACK_COLOR = cpystr(DEFAULT_TITLE_BACK_RGB);
GLO_TITLECLOSED_FORE_COLOR = cpystr(DEFAULT_TITLECLOSED_FORE_RGB);
GLO_TITLECLOSED_BACK_COLOR = cpystr(DEFAULT_TITLECLOSED_BACK_RGB);
+ GLO_FOLDER_FORE_COLOR = cpystr(DEFAULT_NORM_FORE_RGB);
+ GLO_DIRECTORY_FORE_COLOR = cpystr(DEFAULT_NORM_FORE_RGB);
+ GLO_FOLDER_LIST_FORE_COLOR = cpystr(DEFAULT_NORM_FORE_RGB);
GLO_METAMSG_FORE_COLOR = cpystr(DEFAULT_METAMSG_FORE_RGB);
GLO_METAMSG_BACK_COLOR = cpystr(DEFAULT_METAMSG_BACK_RGB);
GLO_QUOTE1_FORE_COLOR = cpystr(DEFAULT_QUOTE1_FORE_RGB);
@@ -2800,6 +2813,8 @@ feature_list(int index)
F_ENABLE_STRIP_SIGDASHES, h_config_strip_sigdashes, PREF_RPLY, 0},
{"forward-as-attachment", "Forward messages as attachments",
F_FORWARD_AS_ATTACHMENT, h_config_forward_as_attachment, PREF_RPLY, 0},
+ {"preserve-original-fields", NULL,
+ F_PRESERVE_ORIGINAL_FIELD, h_config_preserve_field, PREF_RPLY, 0},
/* Sending Prefs */
{"disable-sender", "Do Not Generate Sender Header",
@@ -6401,6 +6416,9 @@ set_current_color_vals(struct pine *ps)
set_color_val(&vars[V_TITLE_FORE_COLOR], 1);
set_color_val(&vars[V_TITLECLOSED_FORE_COLOR], 0);
+ set_color_val(&vars[V_FOLDER_FORE_COLOR], 0);
+ set_color_val(&vars[V_DIRECTORY_FORE_COLOR], 0);
+ set_color_val(&vars[V_FOLDER_LIST_FORE_COLOR], 0);
set_color_val(&vars[V_STATUS_FORE_COLOR], 1);
set_color_val(&vars[V_KEYLABEL_FORE_COLOR], 1);
set_color_val(&vars[V_KEYNAME_FORE_COLOR], 1);
@@ -6425,6 +6443,7 @@ set_current_color_vals(struct pine *ps)
set_color_val(&vars[V_INCUNSEEN_FORE_COLOR], 0);
set_color_val(&vars[V_SIGNATURE_FORE_COLOR], 0);
+ set_current_val(&ps->vars[V_INDEX_TOKEN_COLORS], TRUE, TRUE);
set_current_val(&ps->vars[V_VIEW_HDR_COLORS], TRUE, TRUE);
set_current_val(&ps->vars[V_KW_COLORS], TRUE, TRUE);
set_custom_spec_colors(ps);
@@ -6577,6 +6596,11 @@ var_defaults_to_rev(struct variable *v)
void
set_custom_spec_colors(struct pine *ps)
{
+ if(ps->index_token_colors)
+ free_spec_colors(&ps->index_token_colors);
+
+ ps->index_token_colors = spec_colors_from_varlist(ps->VAR_INDEX_TOKEN_COLORS, 1);
+
if(ps->hdr_colors)
free_spec_colors(&ps->hdr_colors);
@@ -7739,6 +7763,12 @@ config_help(int var, int feature)
case V_TITLECLOSED_FORE_COLOR :
case V_TITLECLOSED_BACK_COLOR :
return(h_config_titleclosed_color);
+ case V_FOLDER_FORE_COLOR:
+ return(h_config_folder_color);
+ case V_DIRECTORY_FORE_COLOR:
+ return(h_config_directory_color);
+ case V_FOLDER_LIST_FORE_COLOR:
+ return(h_config_folder_list_color);
case V_STATUS_FORE_COLOR :
case V_STATUS_BACK_COLOR :
return(h_config_status_color);
@@ -7809,6 +7839,8 @@ config_help(int var, int feature)
return(h_config_metamsg_color);
case V_VIEW_HDR_COLORS :
return(h_config_customhdr_color);
+ case V_INDEX_TOKEN_COLORS :
+ return(h_config_indextoken_color);
case V_PRINTER :
return(h_config_printer);
case V_PERSONAL_PRINT_CATEGORY :
diff --git a/pith/conf.h b/pith/conf.h
index 4c6bae4a..54c23ff5 100644
--- a/pith/conf.h
+++ b/pith/conf.h
@@ -374,6 +374,18 @@
#define GLO_TITLECLOSED_FORE_COLOR vars[V_TITLECLOSED_FORE_COLOR].global_val.p
#define VAR_TITLECLOSED_BACK_COLOR vars[V_TITLECLOSED_BACK_COLOR].current_val.p
#define GLO_TITLECLOSED_BACK_COLOR vars[V_TITLECLOSED_BACK_COLOR].global_val.p
+#define VAR_FOLDER_FORE_COLOR vars[V_FOLDER_FORE_COLOR].current_val.p
+#define GLO_FOLDER_FORE_COLOR vars[V_FOLDER_FORE_COLOR].global_val.p
+#define VAR_FOLDER_BACK_COLOR vars[V_FOLDER_BACK_COLOR].current_val.p
+#define GLO_FOLDER_BACK_COLOR vars[V_FOLDER_BACK_COLOR].global_val.p
+#define VAR_DIRECTORY_FORE_COLOR vars[V_DIRECTORY_FORE_COLOR].current_val.p
+#define GLO_DIRECTORY_FORE_COLOR vars[V_DIRECTORY_FORE_COLOR].global_val.p
+#define VAR_DIRECTORY_BACK_COLOR vars[V_DIRECTORY_BACK_COLOR].current_val.p
+#define GLO_DIRECTORY_BACK_COLOR vars[V_DIRECTORY_BACK_COLOR].global_val.p
+#define VAR_FOLDER_LIST_FORE_COLOR vars[V_FOLDER_LIST_FORE_COLOR].current_val.p
+#define GLO_FOLDER_LIST_FORE_COLOR vars[V_FOLDER_LIST_FORE_COLOR].global_val.p
+#define VAR_FOLDER_LIST_BACK_COLOR vars[V_FOLDER_LIST_BACK_COLOR].current_val.p
+#define GLO_FOLDER_LIST_BACK_COLOR vars[V_FOLDER_LIST_BACK_COLOR].global_val.p
#define VAR_STATUS_FORE_COLOR vars[V_STATUS_FORE_COLOR].current_val.p
#define VAR_STATUS_BACK_COLOR vars[V_STATUS_BACK_COLOR].current_val.p
#define VAR_HEADER_GENERAL_FORE_COLOR vars[V_HEADER_GENERAL_FORE_COLOR].current_val.p
@@ -447,6 +459,7 @@
#define VAR_PROMPT_FORE_COLOR vars[V_PROMPT_FORE_COLOR].current_val.p
#define VAR_PROMPT_BACK_COLOR vars[V_PROMPT_BACK_COLOR].current_val.p
#define VAR_VIEW_HDR_COLORS vars[V_VIEW_HDR_COLORS].current_val.l
+#define VAR_INDEX_TOKEN_COLORS vars[V_INDEX_TOKEN_COLORS].current_val.l
#ifdef SMIME
#define VAR_PUBLICCERT_DIR vars[V_PUBLICCERT_DIR].current_val.p
#define GLO_PUBLICCERT_DIR vars[V_PUBLICCERT_DIR].global_val.p
diff --git a/pith/conftype.h b/pith/conftype.h
index d1fddddb..c654f6c5 100644
--- a/pith/conftype.h
+++ b/pith/conftype.h
@@ -204,6 +204,12 @@ typedef enum { V_PERSONAL_NAME = 0
, V_TITLE_BACK_COLOR
, V_TITLECLOSED_FORE_COLOR
, V_TITLECLOSED_BACK_COLOR
+ , V_FOLDER_FORE_COLOR
+ , V_FOLDER_BACK_COLOR
+ , V_DIRECTORY_FORE_COLOR
+ , V_DIRECTORY_BACK_COLOR
+ , V_FOLDER_LIST_FORE_COLOR
+ , V_FOLDER_LIST_BACK_COLOR
, V_STATUS_FORE_COLOR
, V_STATUS_BACK_COLOR
, V_KEYLABEL_FORE_COLOR
@@ -256,6 +262,7 @@ typedef enum { V_PERSONAL_NAME = 0
, V_IND_FROM_BACK_COLOR
, V_IND_OP_FORE_COLOR
, V_IND_OP_BACK_COLOR
+ , V_INDEX_TOKEN_COLORS
, V_VIEW_HDR_COLORS
, V_KW_COLORS
#if defined(DOS) || defined(OS2)
@@ -516,6 +523,7 @@ typedef enum {
F_RENDER_HTML_INTERNALLY,
F_ENABLE_JUMP_CMD,
F_FORWARD_AS_ATTACHMENT,
+ F_PRESERVE_ORIGINAL_FIELD,
#ifndef _WINDOWS
F_USE_SYSTEM_TRANS,
#endif /* ! _WINDOWS */
diff --git a/pith/filter.c b/pith/filter.c
index b8712b23..692d6319 100644
--- a/pith/filter.c
+++ b/pith/filter.c
@@ -1021,7 +1021,7 @@ gf_bytes_piped(void)
*/
char *
gf_filter(char *cmd, char *prepend, STORE_S *source_so, gf_io_t pc,
- FILTLIST_S *aux_filters, int disable_reset,
+ FILTLIST_S *aux_filters, int silent, int disable_reset,
void (*pipecb_f)(PIPE_S *, int, void *))
{
unsigned char c, obuf[MAX(MB_LEN_MAX,32)];
@@ -1058,8 +1058,9 @@ gf_filter(char *cmd, char *prepend, STORE_S *source_so, gf_io_t pc,
* Spawn filter feeding it data, and reading what it writes.
*/
so_seek(source_so, 0L, 0);
- flags = PIPE_WRITE | PIPE_READ | PIPE_NOSHELL |
- (!disable_reset ? PIPE_RESET : 0);
+ flags = PIPE_WRITE | PIPE_READ | PIPE_NOSHELL
+ | (silent ? PIPE_SILENT : 0)
+ | (!disable_reset ? PIPE_RESET : 0);
if((fpipe = open_system_pipe(cmd, NULL, NULL, flags, 0, pipecb_f, pipe_report_error)) != NULL){
diff --git a/pith/filter.h b/pith/filter.h
index 07cfbd7a..9916803d 100644
--- a/pith/filter.h
+++ b/pith/filter.h
@@ -176,7 +176,7 @@ void gf_set_terminal(gf_io_t);
char *gf_pipe(gf_io_t, gf_io_t);
long gf_bytes_piped(void);
char *gf_filter(char *, char *, STORE_S *, gf_io_t, FILTLIST_S *, int,
- void (*)(PIPE_S *, int, void *));
+ int, void (*)(PIPE_S *, int, void *));
void gf_binary_b64(FILTER_S *, int);
void gf_b64_binary(FILTER_S *, int);
void gf_qp_8bit(FILTER_S *, int);
diff --git a/pith/handle.h b/pith/handle.h
index a6f87ada..ab551868 100644
--- a/pith/handle.h
+++ b/pith/handle.h
@@ -40,6 +40,7 @@ typedef struct handle_s {
unsigned using_is_used:1; /* bit below is being used */
unsigned is_used:1; /* if not, remove it from list */
unsigned color_unseen:1; /* we're coloring folders with unseen */
+ unsigned color_folder:1; /* and just folders for that matter... */
unsigned is_dual_do_open:1; /* choosing this handle means open */
union {
struct { /* URL corresponding to this handle */
diff --git a/pith/mailindx.c b/pith/mailindx.c
index f3b68bfb..09cdc2c8 100644
--- a/pith/mailindx.c
+++ b/pith/mailindx.c
@@ -573,6 +573,17 @@ static INDEX_PARSE_T itokens[] = {
{NULL, iNothing, FOR_NOTHING}
};
+INDEX_PARSE_T itokensinv[sizeof(itokens)/sizeof(itokens[0])];
+
+void
+inverse_itokens(void)
+{
+ INDEX_PARSE_T *pt;
+ for (pt = itokens; pt->name; pt++)
+ itokensinv[pt->ctype].ctype = pt - itokens;
+
+}
+
INDEX_PARSE_T *
itoken(int i)
{
@@ -1990,6 +2001,7 @@ format_index_index_line(INDEXDATA_S *idata)
ICE_S *ice, **icep;
IFIELD_S *ifield;
IELEM_S *ielem;
+ COLOR_PAIR *color = NULL;
struct variable *vars = ps_global->vars;
dprint((8, "=== format_index_line(msgno=%ld,rawno=%ld) ===\n",
@@ -2933,6 +2945,14 @@ format_index_index_line(INDEXDATA_S *idata)
if(!ifield->ielem){
ielem = new_ielem(&ifield->ielem);
+ if(color = hdr_color(itokens[itokensinv[cdesc->ctype].ctype].name, NULL, ps_global->index_token_colors)){
+ if(pico_usingcolor()){
+ ielem->color = new_color_pair(color->fg, color->bg);
+ ielem->type = eTypeCol;
+ }
+ free_color_pair(&color);
+ }
+
ielem->freedata = 1;
ielem->data = cpystr(str);
ielem->datalen = strlen(str);
diff --git a/pith/mailindx.h b/pith/mailindx.h
index 4c45268c..8eb23033 100644
--- a/pith/mailindx.h
+++ b/pith/mailindx.h
@@ -37,6 +37,7 @@ void init_index_format(char *, INDEX_COL_S **);
void free_index_format(INDEX_COL_S **);
void reset_index_format(void);
INDEX_PARSE_T *itoktype(char *, int);
+void inverse_itokens(void);
char *prepend_keyword_subject(MAILSTREAM *, long, char *, SubjKW, IELEM_S **, char *);
int get_index_line_color(MAILSTREAM *, SEARCHSET *, PAT_STATE **, COLOR_PAIR **);
void setup_for_index_index_screen(void);
diff --git a/pith/pine.hlp b/pith/pine.hlp
index b4cb5283..07ff3cc0 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -141,7 +141,7 @@ reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-$Id: pine.hlp 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $
+$Id: pine.hlp 1266 2013-02-07 18:39:12Z chappa@washington.edu $
============= h_news =================
<HTML>
<HEAD>
@@ -180,7 +180,19 @@ Additions include:
<P>
<UL>
+ <LI> Add ability to <A HREF="h_config_folder_color">color folder names</A>, <A
+HREF="h_config_directory_color">directory names</A>,
+ and <A HREF="h_config_folder_list_color">text</A> in the FOLDER SCREEN
+ <LI> Add the ability to <A HREF="h_config_indextoken_color">color any token</A>
+used in the display of the INDEX SCREEN.
+ <LI> New option <A HREF="h_config_preserve_field"><!--#echo var="FEAT_preserve-original-fields"--></A>
+that adds the ability to preserve To: and Cc: fields when replying to a
+message, as specified by original sender.
+ <LI> Add a _SILENT_ token to the
+<A HREF="h_config_display_filters">list of tokens</A>
+ for a display filter, so that Alpine will not redraw the screen when it is unnecessary.
<LI> Quota command includes subcommands for printing, forwarding, etc.
+
</UL>
<P>
@@ -3271,6 +3283,7 @@ There are also additional details on
<li><a href="h_config_no_fcc_attach">FEATURE: <!--#echo var="FEAT_fcc-without-attachments"--></a>
<li><a href="h_config_force_arrow">FEATURE: <!--#echo var="FEAT_force-arrow-cursor"--></a>
<li><a href="h_config_forward_as_attachment">FEATURE: <!--#echo var="FEAT_forward-as-attachment"--></a>
+<li><a href="h_config_preserve_field">FEATURE: <!--#echo var="FEAT_preserve-original-fields"--></a>
<li><a href="h_config_quell_empty_dirs">FEATURE: <!--#echo var="FEAT_quell-empty-directories"--></a>
<li><a href="h_config_hide_nntp_path">FEATURE: <!--#echo var="FEAT_hide-nntp-path"--></a>
<li><a href="h_config_attach_in_reply">FEATURE: <!--#echo var="FEAT_include-attachments-in-reply"--></a>
@@ -22932,6 +22945,13 @@ This number could be used as a session key. It is sent in this way to
improve security. The number is unique to the current Alpine session
and is only generated once per session.
</DD>
+
+<DT>_SILENT_</DT>
+<DD>When the filter is executed, this token tells Alpine not to repaint
+the screen while the command is being executed. This can be used with
+filters that do not interact with the user, and therefore repainting
+the screen is not necessary.
+</DD>
</DL>
<P>
@@ -27766,6 +27786,42 @@ the sender of the forwarded message, or process it as part of a spam report.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+====== h_config_preserve_field =====
+<HTML>
+<HEAD>
+<TITLE>FEATURE: <!--#echo var="FEAT_preserve-original-fields"--></TITLE>
+</HEAD>
+<BODY>
+<H1>FEATURE: <!--#echo var="FEAT_preserve-original-fields"--></H1>
+
+When you reply to a message that has been sent to several recipients, some of
+them may have been added in different parts of the headers. For example,
+some of the recipients will be listed in the To: header, while others will
+be listed in the Cc: header.
+<P>
+If this feature is disabled, the default behavior of Alpine will be used,
+and that is, that almost all recipients of the message will be
+listed in the Cc: field. However, if you enable this feature, then,
+excepting you, recipients originally listed in the Cc: field will be
+listed again in the Cc: field, and those listed in the To: field in the
+original message will be listed in the To: field again. The person in the
+From: field will be added to the To: field.
+<P>
+Note that this will cause some messages that you send in Alpine to look
+different. In particular, the To: field of a message will not be put in the
+Cc: field, as is normally done. In fact, most people expect this to happen.
+If you find that this is a problem you should disable this feature. You can
+still make Alpine have this behavior on a per message basis. In order to do
+this, you will see a new option in the menu for the &quot;Reply to all
+recipients?&quot; question. In this case, pressing &quot;p&quot; will make
+Alpine toggle its question so you can preserve the To: and Cc: fields for that
+message.
+<UL>
+<LI><A HREF="h_finding_help">Finding more information and requesting help</A>
+</UL><P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
====== h_config_sub_lists =====
<HTML>
<HEAD>
@@ -31391,6 +31447,99 @@ to see the available Editing and Navigation commands.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+====== h_config_folder_color =====
+<HTML>
+<HEAD>
+<TITLE>OPTION: Folder Color</TITLE>
+</HEAD>
+<BODY>
+<H1>OPTION: Folder Color</H1>
+
+Sets the colors Alpine uses for coloring a folder in the FOLDER LIST
+screen. By default, the Folder Color is the normal text color.
+
+<P>
+If you set a color for this feature, other than the normal color
+(the default), or a color for
+<A HREF="h_config_directory_color">Directory Color</A>, then directories
+will be colored according to the color specified in the
+<A HREF="h_config_directory_color">Directory Color</A> option. In this
+case, the color will be the only indication that the colored name
+refers to a directory. The normal behavior is that Alpine
+indicates that a name refers to a directory by appending a
+separator (like &quot;/&quot; or &quot;.&quot;) to the name of
+the folder.
+
+<P>
+If a folder is a directory, then the folder name will be painted
+according to the color defined by this variable, and a separator
+indicator (like &quot;/&quot; or &quot;.&quot;) will be added
+to the name. That
+indicator will be painted according to the color defined in the
+<A HREF="h_config_directory_color">Directory Color</A> option.
+
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
+====== h_config_directory_color =====
+<HTML>
+<HEAD>
+<TITLE>OPTION: Directory Color</TITLE>
+</HEAD>
+<BODY>
+<H1>OPTION: Directory Color</H1>
+
+Sets the colors Alpine uses for coloring a directory in the FOLDER LIST
+screen. By default, the Folder Color is the normal text color.
+<P>
+If you set a color for this feature, other than the normal color
+(the default), or a color for
+<A HREF="h_config_folder_color">Folder Color</A>, then folders
+will be colored according to the color specified in the
+<A HREF="h_config_folder_color">Folder Color</A> option. In this
+case, the color will be the only indication that the colored name
+refers to a directory. The normal behavior is that Alpine
+indicates that a name refers to a directory by appending a
+separator (like &quot;/&quot; or &quot;.&quot;) to the name of
+the folder.
+<P>
+If a folder is a directory, then the folder name will be painted
+according to the color defined by the option
+<A HREF="h_config_folder_color">Folder Color</A>, and the separator
+indicator (like &quot;/&quot; or &quot;.&quot;) will be added
+after the name. That
+indicator will be painted according to the color defined in this
+option.
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
+====== h_config_folder_list_color =====
+<HTML>
+<HEAD>
+<TITLE>OPTION: Folder-List Color</TITLE>
+</HEAD>
+<BODY>
+<H1>OPTION: Folder-List Color</H1>
+
+Sets the colors Alpine uses for coloring normal text in the FOLDER LIST
+screen. By default, the Folder-List Color is the normal text color.
+<P>
+This text refers to the informative text that Alpine displays so you
+can recognize each collection. The color of the content of each collection
+is determined by the options <A HREF="h_config_folder_color">Folder Color</A>
+and <A HREF="h_config_directory_color">Directory Color</A>.
+<P>
+Unlike the options
+<A HREF="h_config_folder_color">Folder Color</A>
+and <A HREF="h_config_directory_color">Directory Color</A>, configuring
+this option does not affect the way that Alpine reports folders,
+directories and folders that are directories.
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
====== h_config_incunseen_color =====
<HTML>
<HEAD>
@@ -31713,6 +31862,35 @@ to see the available Editing and Navigation commands.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+====== h_config_indextoken_color =====
+<HTML>
+<HEAD>
+<TITLE>OPTION: <!--#echo var="VAR_index-token-colors"--></TITLE>
+</HEAD>
+<BODY>
+<H1>OPTION: <!--#echo var="VAR_index-token-colors"--></H1>
+
+This option allows you to set up the color in which any token, not specified by the
+previous options, will be colored in the MESSAGE INDEX screen.
+<P>
+In order to use this option, you must press the &quot;I&quot; <B>IndxHdr</B> command, and add
+a token that can be used in the index format.
+The list of available tokens is <A HREF="h_index_tokens">here</A>.
+<P>
+If you fail to enter a valid token your entry will be ignored, and you will be asked to
+enter a new one. Once you have entered a valid token, a line will be added to the
+configuration screen that you can use to set up the colors in which that token will
+be painted. This is done in the same way that you configure colors for other
+variables.
+
+<A HREF="h_color_setup">Descriptions of the available commands</A>
+<P>
+Look <A HREF="h_edit_nav_cmds">here</A>
+to see the available Editing and Navigation commands.
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
====== h_config_customhdr_pattern =====
<HTML>
<HEAD>
@@ -35324,3 +35502,6 @@ in size will be selected. Examples: 2176, 1.53K (1530), or 3M (3000000).
========== h_select_by_smaller_size ==========
Enter a number or ^C to cancel. All messages less than this many characters
in size will be selected. Examples: 2176, 1.53K (1530), or 3M (3000000).
+========== h_preserve_field ==========
+Use 'p' to toggle between preserving or not preserving the original To:
+and Cc: fields of the message. Enter ^C to cancel message.
diff --git a/pith/reply.c b/pith/reply.c
index 03468af3..3445097f 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -373,20 +373,37 @@ reply_seed(struct pine *ps, ENVELOPE *outgoing, ENVELOPE *env,
/* Put Reply-To or From in To. */
*to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to,
(ADDRESS *) NULL, saved_from, RCA_ALL);
- /* and the rest in cc */
if(replytoall){
- *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
+ if(ps->preserve){
+ while(*to_tail)
+ to_tail = &(*to_tail)->next;
+
+ *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to,
+ (ADDRESS *) NULL, saved_to, RCA_ALL);
+
+ while(*to_tail)
+ to_tail = &(*to_tail)->next;
+
+ *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
+ outgoing->to, saved_resent, RCA_ALL);
+
+ *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
+ outgoing->to, saved_cc, RCA_ALL);
+ }
+ else{ /* and the rest in cc */
+ *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
outgoing->to, saved_to, RCA_ALL);
- while(*cc_tail) /* stay on last address */
- cc_tail = &(*cc_tail)->next;
+ while(*cc_tail) /* stay on last address */
+ cc_tail = &(*cc_tail)->next;
- *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
+ *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
outgoing->to, saved_cc, RCA_ALL);
- while(*cc_tail)
- cc_tail = &(*cc_tail)->next;
+ while(*cc_tail)
+ cc_tail = &(*cc_tail)->next;
- *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
+ *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc,
outgoing->to, saved_resent, RCA_ALL);
+ }
}
}
else if(saved_to){
diff --git a/pith/state.c b/pith/state.c
index e88c27f6..94f95f10 100644
--- a/pith/state.c
+++ b/pith/state.c
@@ -183,6 +183,9 @@ free_pine_struct(struct pine **pps)
if((*pps)->hdr_colors)
free_spec_colors(&(*pps)->hdr_colors);
+ if((*pps)->index_token_colors)
+ free_spec_colors(&(*pps)->index_token_colors);
+
if((*pps)->keywords)
free_keyword_list(&(*pps)->keywords);
diff --git a/pith/state.h b/pith/state.h
index 93db4f4b..47e97ce4 100644
--- a/pith/state.h
+++ b/pith/state.h
@@ -242,6 +242,7 @@ struct pine {
char **feat_list_back_compat;
SPEC_COLOR_S *hdr_colors; /* list of configed colors for view */
+ SPEC_COLOR_S *index_token_colors; /* list of configed colors for index */
short init_context;
@@ -286,6 +287,8 @@ struct pine {
SortOrder def_sort, /* Default sort type */
sort_types[22];
+ int preserve;
+
int last_expire_year, last_expire_month;
int printer_category;