Hi!
In process of recovering "prefix" search method I foung 2 bugs:
Strings::lowercase(),Strings::uppercase() didn't support national chars:
fix commited, and List::Get_Next() don't change current_index.
List::Start_Get:
void Start_Get(ListCursor& cursor) const { cursor.current
= head; cursor.current_index = -1;}
>From List::Get_Next()
if (cursor.current_index >= 0)
cursor.current_index++;
^^^^^ this code never executes because current_index == -1
My preposition:
1. start current_index counting from 0, not from -1.
2. remove check cursor.current_index >= 0. Anyone know what for it is?
Vadim.
Index: htlib/List.h
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htlib/List.h,v
retrieving revision 1.5
diff -u -r1.5 List.h
--- htlib/List.h 1999/09/29 16:33:12 1.5
+++ htlib/List.h 1999/12/28 16:42:25
@@ -86,7 +86,7 @@
// List traversel
//
void Start_Get() { Start_Get(cursor); }
- void Start_Get(ListCursor& cursor) const {
cursor.current = h
ead; cursor.current_index = -1;}
+ void Start_Get(ListCursor& cursor) const {
cursor.current = h
ead; cursor.current_index = 0;}
Object *Get_Next() { return Get_Next(cursor); }
Object *Get_Next(ListCursor& cursor) const;
Object *Get_First();
============================================================================
Index: htlib/List.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htlib/List.cc,v
retrieving revision 1.6
diff -u -r1.6 List.cc
--- htlib/List.cc 1999/09/29 16:33:12 1.6
+++ htlib/List.cc 1999/12/28 16:42:25
@@ -253,7 +253,7 @@
if (cursor.current)
{
cursor.current = cursor.current->next;
- if (cursor.current_index >= 0)
+// if (cursor.current_index >= 0)
cursor.current_index++;
}
else
==================================================================
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.