On Fri, Sep 15, 2000 at 09:13:14PM +0200, Lukasz Stelmach <[EMAIL PROTECTED]> wrote:
> By�a godzina 15:58:34 w czwartek 14 wrzesie�, gdy do autobusu wsiad� kanar
> i wrzasn��:"David Champion!!! Bilecik do kontroli!!!" A on(a) na to:
>
> >>> I want the pager to treat signatures the same as the body
> >> Correct me if i am wrong you do not wan colorful signature?
> > Correct, but I also want my body regexes to color parts of the
> > signature -- I don't want it treated as a single big block.
>
> Try to find in the sources the '-- ' (dash dash space) string and that
> should be the right place to alter.
Try the attached, mostly untested patch to remove signature
processing (i.e., remove all support from mutt).
--
Bob Bell <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
"Every rectal thermometer made by Q-Tip has been personally tested."
-- Material packaged with a Q-Tip rectal thermometer
diff -ru -x CVS mutt-cvs/pager.c mutt/pager.c
--- mutt-cvs/pager.c Tue Sep 5 11:01:09 2000
+++ mutt/pager.c Fri Sep 15 16:39:13 2000
@@ -136,39 +136,6 @@
} *Resize = NULL;
#endif
-#define NumSigLines 4
-
-static int check_sig (const char *s, struct line_t *info, int n)
-{
- int count = 0;
-
- while (n > 0 && count <= NumSigLines)
- {
- if (info[n].type != MT_COLOR_SIGNATURE)
- break;
- count++;
- n--;
- }
-
- if (count == 0)
- return (-1);
-
- if (count > NumSigLines)
- {
- /* check for a blank line */
- while (*s)
- {
- if (!ISSPACE (*s))
- return 0;
- s++;
- }
-
- return (-1);
- }
-
- return (0);
-}
-
static void
resolve_color (struct line_t *lineInfo, int n, int cnt, int flags, int special,
ansi_attr *a)
@@ -732,28 +699,6 @@
}
else if (mutt_strncmp ("[-- ", buf, 4) == 0)
lineInfo[n].type = MT_COLOR_ATTACHMENT;
- else if (mutt_strcmp ("-- \n", buf) == 0 || mutt_strcmp ("-- \r\n", buf) == 0)
- {
- i = n + 1;
-
- lineInfo[n].type = MT_COLOR_SIGNATURE;
- while (i < last && check_sig (buf, lineInfo, i - 1) == 0 &&
- (lineInfo[i].type == MT_COLOR_NORMAL ||
- lineInfo[i].type == MT_COLOR_QUOTED ||
- lineInfo[i].type == MT_COLOR_HEADER))
- {
- /* oops... */
- if (lineInfo[i].chunks)
- {
- lineInfo[i].chunks = 0;
- safe_realloc ((void **) &(lineInfo[n].syntax),
- sizeof (struct syntax_t));
- }
- lineInfo[i++].type = MT_COLOR_SIGNATURE;
- }
- }
- else if (check_sig (buf, lineInfo, n - 1) == 0)
- lineInfo[n].type = MT_COLOR_SIGNATURE;
else if (regexec ((regex_t *) QuoteRegexp.rx, buf, 1, pmatch, 0) == 0)
{
if (regexec ((regex_t *) Smileys.rx, buf, 1, smatch, 0) == 0)