Re: [aseek-devel] Czech Langmaps and corrected unicode table - corrected patch

From: Jan Karabina (no email)
Date: Sun Dec 02 2001 - 10:56:43 EST


On Sun, 2 Dec 2001, Jan Karabina wrote:
> 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.
I sent bad one,sorry.

attached chp2.patch is better:), against today CVS tree...

--
Jan Karabina mailto: (private: )

--- /usr/src/aspseek/src/charsets.cpp Fri May 18 18:22:05 2001
+++ charsets.cpp Sun Dec 2 14:24:18 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)
--- /usr/src/aspseek/src/ucharset.cpp Sat Sep 22 13:05:45 2001
+++ ucharset.cpp Sun Dec 2 14:24:40 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)
--- /usr/src/aspseek/src/stopwords.cpp Tue Nov 27 13:28:16 2001
+++ stopwords.cpp Sun Dec 2 16:29:03 2001
@@ -64,7 +64,7 @@
         {
                 line_no++;
                 ch_p = Trim(str, " \t\n\r");
- if (!ch_p || (*ch_p == '#') || (*ch_p == 0) || (strlen(ch_p) > 16)) // empty line or comment
+ if (!*ch_p || (*ch_p == '#') || (*ch_p == 0) || (strlen(ch_p) > 16)) // empty line or comment
                         continue;
                 // FIXME: do we need to check for something before inserting?
 #ifdef UNICODE








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD