On Mon, 19 Aug 2002, Nils Ellmenreich wrote: > Hi all, > > This is on RedHat 7.1. I've tried it with the delivered gcc 2.96 and > also with gcc 3.1.1. and aspell-0.50-20020815. While checking a file > with the following command line > > aspell -c -t --add-tex-command="bibliography p" \ > --add-tex-command="verbatim p" --add-tex-command="figure o p" \ > --add-tex-command="texttt p" --lang=en_GB foo.tex
The attached patch should fix the problem. It was actually a rather serious problem when the null at the end of the string was being changed to a space. It also fixes a small bug when the ".tex" extension wasn't being recognized like it should. The "-t" should now be optional. I will commit my changes after I get rid of all the debugging print statements. And fix a releated bug in the html filter. --- http://kevin.atkinson.dhs.org
Index: modules/filter/tex.cpp =================================================================== RCS file: /cvsroot/aspell/aspell/modules/filter/tex.cpp,v retrieving revision 1.8 diff -u -r1.8 tex.cpp --- modules/filter/tex.cpp 12 Aug 2002 23:10:18 -0000 1.8 +++ modules/filter/tex.cpp 20 Aug 2002 23:00:34 -0000 @@ -208,7 +208,8 @@ void TexFilter::process(FilterChar * & str, FilterChar * & stop) { FilterChar * cur = str; - while (cur != stop) { + FilterChar * stop0 = stop - 1; + while (cur != stop0) { if (process_char(*cur)) *cur = ' '; ++cur; @@ -345,5 +346,5 @@ {"tex-extension", KeyInfoList, "tex", "TeX file extensions"} }; const KeyInfo * tex_options_begin = tex_options; - const KeyInfo * tex_options_end = tex_options + 2; + const KeyInfo * tex_options_end = tex_options + 3; }