Lines Matching refs:item
19 SHLIST *item;
21 for(item=head->next;( item != head );item=item->next)
23 if( func( val, item->data ) ) {
24 return( item );
28 if( item->data == val ) {
29 return( item );
51 SHLIST *item;
54 for(i=0,item=head->next;( (i < num) && (item != head) );i++,item=item->next);
55 if( item != head )
56 return( item );
60 SHLIST *shListGetNextItem( SHLIST *head, SHLIST *item )
62 if( item == NULL )
64 if( item->next != head )
65 return( item->next );
69 SHLIST *shListGetPrevItem( SHLIST *head, SHLIST *item )
71 if( item == NULL )
73 if( item->prev != head )
74 return( item->prev );
78 void shListDelItem( SHLIST *head, SHLIST *item, shListFree func )
80 if( item == NULL )
83 fprintf(stderr, "Del %lx\n", (unsigned long)(item->data));
85 (item->prev)->next = item->next;
86 (item->next)->prev = item->prev;
87 if( func && item->data ) {
88 func( (void *)(item->data) );
90 free( item );
96 SHLIST *item;
98 item = (SHLIST *)malloc( sizeof(SHLIST) );
99 if( item == NULL )
101 item->data = val;
102 item->next = head->next;
103 item->prev = head;
104 (head->next)->prev = item;
105 head->next = item;
107 fprintf(stderr, "Ins First %lx\n", (unsigned long)(item->data));
114 SHLIST *item;
116 item = (SHLIST *)malloc( sizeof(SHLIST) );
117 if( item == NULL )
119 item->data = val;
120 item->next = head;
121 item->prev = head->prev;
122 (head->prev)->next = item;
123 head->prev = item;
125 fprintf(stderr, "Ins Last %lx\n", (unsigned long)(item->data));
133 SHLIST *item, *iptr;
138 item = (SHLIST *)malloc( sizeof(SHLIST) );
139 if( item == NULL )
141 item->data = val;
145 item->next = iptr;
146 item->prev = iptr->prev;
147 (iptr->prev)->next = item;
148 iptr->prev = item;
150 fprintf(stderr, "Ins Before %lx\n", (unsigned long)(item->data));
158 SHLIST *item;
160 for(item=head->next;( item != head );) {
161 shListDelItem( head, item, func );
162 item = head->next;
170 SHLIST *item;
172 for(item=head->next;( item != head );item=item->next)
174 func(item->data);
177 fprintf(stderr, "Item: %lx\n",(unsigned long)(item->data));