Re: Length of regex/pattern for "color"
in message <20031021083350.GA27654@xxxxxxxx>,
wrote Edmund GRIMLEY EVANS thusly...
>
> parv <parv_fm@xxxxxxxxxxx>:
>
> > My question is how should i increase the allowable length of
> > a pattern? Is it even sane thing to do?
>
> I think this patch does it.
>
> Perhaps someone should go through mutt and get rid of all fixed-length
> buffers ...
>
>
> Index: color.c
> ===================================================================
> RCS file: /home/roessler/cvs/mutt/color.c,v
> retrieving revision 3.3
> diff -u -r3.3 color.c
> --- color.c 8 Apr 2003 21:41:39 -0000 3.3
> +++ color.c 21 Oct 2003 08:29:23 -0000
> @@ -511,7 +511,7 @@
> else
> {
> int r;
> - char buf[STRING];
> + char buf[LONG_STRING];
>
> tmp = mutt_new_color_line ();
> if (is_index)
Thanks for the patch. I tried it, but i still get "parentheses not
balanced" for a setting like the one below...
color index brightyellow black \
"~s
'(archivers/p5-Archive-Tar|archivers/p5-Compress-Zlib|devel/p5-AppConfig|devel/p5-Class-Factory-Util|devel/p5-Class-Singleton|devel/p5-Config-General|devel/p5-Config-Ini|devel/p5-Date-Calc|devel/p5-Date-ICal|devel/p5-Date-ISO|devel/p5-Date-Leapyear|devel/p5-Date-Manip|devel/p5-Date-Pcalc|devel/p5-DateConvert|devel/p5-DateTime|devel/p5-DateTime-Locale|devel/p5-DateTime-TimeZone|devel/p5-ExtUtils-ParseXS|devel/p5-File-Temp|devel/p5-Inline|devel/p5-Inline-CPP|devel/p5-Locale-Maketext|devel/p5-Memoize|devel/p5-Module-Build|devel/p5-Params-Validate|devel/p5-Parse-RecDescent|devel/p5-Storable|devel/p5-Test-Harness|devel/p5-Test-Inline|devel/p5-Test-Simple|devel/p5-Tie-IxHash|devel/p5-Time-HiRes|devel/p5-Time-Local|devel/p5-Time-modules|devel/p5-TimeDate|dns/p5-Net-DNS|mail/p5-Mail-SpamAssassin|mail/p5-Mail-Tools|math/p5-Bit-Vector|misc/p5-I18N-LangTags|net/p5-URI|security/p5-Digest-HMAC|security/p5-Digest-MD5|security/p5-Digest-Nilsimsa|security/p5-Digest-SHA1|textproc/p5-FreeBSD-Ports|textproc/p5-Text-Balanced|textproc/p5-Text-Template|textproc/p5-YAML|www/p5-CGI-Application|www/p5-CGI-Kwiki|www/p5-CGI-modules|www/p5-CGI-Session|www/p5-CGI.pm|www/p5-HTML-Parser|www/p5-HTML-Tagset|www/p5-HTML-Template|www/p5-HTML-Tree|www/p5-libwww|www/p5-Template-Toolkit|x11-toolkits/p5-Tk|x11/p5-X11-Protocol)'"
...then again, following does not produce any results in the mutt
source directory...
grep -rIi 'not balanced' .
...the error message does exist in FreeBSD 4.8p13 libc.so.4. Further,
below is output from ltrace(1) (library/system call tracer) if of any
help...
libintl_gettext(0x080bb7ec, 0x283e6a80, 0xbfbfe664, 0x283e6a80, 0x080d1120) =
0x080bb7ec
snprintf("source: errors in /usr2/home/par"..., 256, "source: errors in %s",
"/usr2/home/parv/cf/mutt/mutt.cf") = 49
fputs("source: errors in /usr2/home/par"..., 0x283d4350source: errors in
/usr2/home/parv/cf/mutt/mutt.cf) = 0
open("/dev/tty", 0, 012) = 5
tcgetattr(5, 0xbfbfe654) = 0
tcsetattr(5, 1, 0xbfbfe654) = 0
fflush(0x283d42f8) = 0
libintl_gettext(0x080b8ce5, 0xbfbfe680, 0x0805d252, 5, 0x283d42f8) =
0x080b8ce5
fputs("Press any key to continue...", 0x283d42f8) = 0
fflush(0x283d42f8Press any key to continue...)
= 0
Does the above prove that the problem lies not in mutt but elsewhere?
Please let me know if you need more information.
- Parv
--
A programmer, budding Unix system administrator, and amateur photographer
seeks employment: http://www103.pair.com/parv/work/