summaryrefslogtreecommitdiff
path: root/pith/text.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-05-31 17:16:44 -0600
committerEduardo Chappa <chappa@washington.edu>2013-05-31 17:16:44 -0600
commita46157ba61f2c65f88b42abb31db60c4a714f87b (patch)
treee37bc41ad2f57b3fd2bad310576cc155a58ca6b7 /pith/text.c
parent81e994d7907f850506ddc248f84761a54995e58c (diff)
downloadalpine-a46157ba61f2c65f88b42abb31db60c4a714f87b.tar.xz
* somehow all.patch got here. Reversing.
Diffstat (limited to 'pith/text.c')
-rw-r--r--pith/text.c45
1 files changed, 15 insertions, 30 deletions
diff --git a/pith/text.c b/pith/text.c
index 2857ddad..5de53e51 100644
--- a/pith/text.c
+++ b/pith/text.c
@@ -92,7 +92,7 @@ decode_text(ATTACH_S *att,
char *err, *charset;
int filtcnt = 0, error_found = 0, column, wrapit;
int is_in_sig = OUT_SIG_BLOCK;
- int is_flowed_msg = 0, add_me = 1, doraw = RAWSTRING;
+ int is_flowed_msg = 0;
int is_delsp_yes = 0;
int filt_only_c0 = 0;
char *parmval;
@@ -171,15 +171,6 @@ decode_text(ATTACH_S *att,
gf_url_hilite_opt(&uh,handlesp,0));
}
- if((flags & FM_DISPLAY)
- && !(flags & FM_NOCOLOR)
- && pico_usingcolor()
- && VAR_SPECIAL_TEXT_FORE_COLOR
- && VAR_SPECIAL_TEXT_BACK_COLOR){
- filters[filtcnt].filter = gf_line_test;
- filters[filtcnt++].data = gf_line_test_opt(color_this_text, NULL);
- }
-
/*
* First, paint the signature.
* Disclaimers noted below for coloring quotes apply here as well.
@@ -189,7 +180,7 @@ decode_text(ATTACH_S *att,
&& pico_usingcolor()
&& VAR_SIGNATURE_FORE_COLOR
&& VAR_SIGNATURE_BACK_COLOR){
- filters[filtcnt].filter = gf_quote_test;
+ filters[filtcnt].filter = gf_line_test;
filters[filtcnt++].data = gf_line_test_opt(color_signature,
&is_in_sig);
}
@@ -207,9 +198,9 @@ decode_text(ATTACH_S *att,
&& pico_usingcolor()
&& VAR_QUOTE1_FORE_COLOR
&& VAR_QUOTE1_BACK_COLOR){
- add_me = 0;
- filters[filtcnt].filter = gf_quote_test;
- filters[filtcnt++].data = gf_line_test_opt(color_a_quote, &is_flowed_msg);
+ filters[filtcnt].filter = gf_line_test;
+ filters[filtcnt++].data = gf_line_test_opt(color_a_quote,
+ &is_flowed_msg);
}
}
else if(!strucmp(att->body->subtype, "richtext")){
@@ -290,11 +281,6 @@ decode_text(ATTACH_S *att,
}
}
- if (add_me){
- filters[filtcnt].filter = gf_quote_test;
- filters[filtcnt++].data = gf_line_test_opt(select_quote, &doraw);
- }
-
/*
* If the message is not flowed, we do the quote suppression before
* the wrapping, because the wrapping does not preserve the quote
@@ -319,7 +305,7 @@ decode_text(ATTACH_S *att,
dq.handlesp = handlesp;
dq.do_color = (!(flags & FM_NOCOLOR) && pico_usingcolor());
- filters[filtcnt].filter = gf_quote_test;
+ filters[filtcnt].filter = gf_line_test;
filters[filtcnt++].data = gf_line_test_opt(delete_quotes, &dq);
}
if(ps_global->VAR_QUOTE_REPLACE_STRING
@@ -378,7 +364,7 @@ decode_text(ATTACH_S *att,
dq.handlesp = handlesp;
dq.do_color = (!(flags & FM_NOCOLOR) && pico_usingcolor());
- filters[filtcnt].filter = gf_quote_test;
+ filters[filtcnt].filter = gf_line_test;
filters[filtcnt++].data = gf_line_test_opt(delete_quotes, &dq);
}
@@ -583,7 +569,7 @@ delete_quotes(long int linenum, char *line, LT_INS_S **ins, void *local)
{
DELQ_S *dq;
char *lp;
- int i, lines, not_a_quote = 0, code;
+ int i, lines, not_a_quote = 0;
size_t len;
dq = (DELQ_S *) local;
@@ -603,8 +589,6 @@ delete_quotes(long int linenum, char *line, LT_INS_S **ins, void *local)
for(i = dq->indent_length; i > 0 && !not_a_quote && *lp; i--)
if(*lp++ != SPACE)
not_a_quote++;
- while(isspace((unsigned char) *lp))
- lp++;
/* skip over leading tags */
while(!not_a_quote
@@ -644,12 +628,13 @@ delete_quotes(long int linenum, char *line, LT_INS_S **ins, void *local)
}
}
- len = lp - line;
- if(strlen(tmp_20k_buf) > len)
- strcpy(tmp_20k_buf, tmp_20k_buf+len);
- code = (dq->is_flowed ? IS_FLOWED : NO_FLOWED) | DELETEQUO;
- select_quote(linenum, lp, ins, &code);
- if (!not_a_quote && !tmp_20k_buf[0])
+ /* skip over whitespace */
+ if(!dq->is_flowed)
+ while(isspace((unsigned char) *lp))
+ lp++;
+
+ /* check first character to see if it is a quote */
+ if(!not_a_quote && *lp != '>')
not_a_quote++;
if(not_a_quote){