From: Jan Karabina (no email)
Date: Sun Dec 02 2001 - 10:22:02 EST
On Tue, 27 Nov 2001, Kir Kolyshkin wrote:
> As for the "Bad line...", can you track the bug down with gdb? It seems
> that index tells the message you mention if it encounters an empty line
> in config, not a line with <> in comment. Well, I haven't checked that.
I found it, see attached patch.
There is problem with blank lines only...
-- Jan Karabina mailto: (private: )
--- charsets.cpp Sun Dec 2 14:24:18 2001
+++ /usr/src/aspseek/src/charsets.cpp Fri May 18 18:22:05 2001
@@ -895,7 +895,7 @@
{
line++;
chp = Trim(str, " \t\n\r");
- if (!*chp || *chp == '#')
+ if (!chp || *chp == '#')
continue;
if (sscanf(chp, "0x%x", &ch) !=1)
{
@@ -1076,7 +1076,7 @@
while (fgets(str, MAX_NGRAMLEN, tbl_f) && (i <= MAX_NGRAM))
{
chp = Trim(str, " \t\n\r");
- if (!*chp || *chp == '#')
+ if (!chp || *chp == '#')
continue;
char *p = ngram;
while(*chp)
--- ucharset.cpp Sun Dec 2 14:24:40 2001
+++ /usr/src/aspseek/src/ucharset.cpp Sat Sep 22 13:05:45 2001
@@ -165,7 +165,7 @@
ULONG code[2], ucode[2];
line++;
chp = Trim(str, " \t\n\r");
- if (!*chp || *chp == '#') continue;
+ if (!chp || *chp == '#') continue;
if (sscanf(chp, "%lx %lx %lx %lx", code, ucode, code + 1, ucode + 1) == 4)
{
if ((code[0] < 0x100) && (code[1] < 0x100))
@@ -203,7 +203,7 @@
ULONG code, ucode;
line++;
chp = Trim(str, " \t\n\r");
- if (!*chp || *chp == '#') continue;
+ if (!chp || *chp == '#') continue;
if (sscanf(chp, "%lx %lx", &code, &ucode) == 2)
{
if (code >= 0x8000)
|
|
|