|
From: <enl...@li...> - 2001-07-19 16:56:01
|
Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewd
Dir : e17/libs/ewd/src
Modified Files:
ewd_dlist.c
Log Message:
A few small fix-ups to the doubly-linked list code. Thanks to BLAdER for the
heads up.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewd/src/ewd_dlist.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewd_dlist.c 2001/07/19 13:03:04 1.4
+++ ewd_dlist.c 2001/07/19 16:56:00 1.5
@@ -312,6 +312,8 @@
{
int i, increment;
+ printf("Index is %d\n", index);
+
if (!list)
return FALSE;
@@ -321,16 +323,20 @@
if (index > ewd_list_nodes(EWD_LIST(list)) || index < 0)
return FALSE;
+ if (EWD_LIST(list)->index > EWD_LIST(list)->nodes)
+ EWD_LIST(list)->index = EWD_LIST(list)->nodes;
+
if (index < ewd_list_index(EWD_LIST(list)))
increment = 1;
else
increment = -1;
- for (i = ewd_list_index(EWD_LIST(list)); i != index; i += increment) {
+ for (i = EWD_LIST(list)->index; i != index; i += increment) {
if (increment > 0)
_ewd_list_next(list);
else
_ewd_dlist_previous(list);
+ printf("i == %d\n", i);
}
return TRUE;
|