Lines Matching full:head
26 if (!queue->head)
29 g_assert (!queue->head);
33 for (list = queue->head; list != NULL; list = list->next)
51 g_assert (last == queue->head);
54 for (list = queue->head; list != NULL; list = list->next)
70 for (list = queue->head; list != NULL; list = list->next)
155 enum { OFF_QUEUE, HEAD, TAIL, MIDDLE, LAST } where;
160 where = g_random_int_range (HEAD, LAST);
168 case HEAD:
221 GList *head;
237 queues[i].head = NULL;
249 g_assert (qinf->head == q->head);
259 g_assert (q->head == NULL);
265 g_assert (q->head);
283 g_assert (qinf->tail == q->head);
284 g_assert (qinf->head == q->tail);
287 qinf->head = q->head;
296 qinf->head = new_queue->head;
297 qinf->tail = g_list_last (new_queue->head);
303 qinf->head = NULL;
357 qinf->head = g_queue_find (q, GINT_TO_POINTER (find_min(q)));
367 if (!qinf->head)
368 qinf->tail = qinf->head = q->head;
370 qinf->head = qinf->head->prev;
379 qinf->tail = qinf->head = q->head;
390 if (qinf->head && qinf->head->prev)
391 qinf->head = qinf->head->prev;
393 qinf->head = q->head;
397 qinf->tail = g_list_last (qinf->head);
402 if (qinf->head)
403 qinf->head = qinf->head->next;
404 if (!qinf->head)
413 qinf->head = NULL;
427 qinf->head = qinf->head->next;
436 if (qinf->head)
437 g_assert (qinf->head->data == g_queue_peek_head (q));
442 if (qinf->head)
463 list = qinf->head;
486 for (list = q->head; list != NULL; list = list->next)
497 qinf->head = q->head;
506 g_queue_remove (q, qinf->head->data);
510 qinf->head = q->head;
518 g_queue_remove_all (q, qinf->head->data);
522 qinf->head = q->head;
532 g_queue_insert_before (q, qinf->head, x);
535 qinf->head = q->head;
545 g_queue_insert_after (q, qinf->head, x);
548 qinf->head = q->head;
570 g_assert (GPOINTER_TO_INT (q->head->data) == min - 1);
571 qinf->head = q->head;
582 qinf->head = link;
590 if (!qinf->head)
591 qinf->head = link;
602 if (qinf->head && qinf->head->prev)
603 qinf->head = qinf->head->prev;
605 qinf->head = q->head;
609 qinf->tail = g_list_last (qinf->head);
616 qinf->head = qinf->head->next;
617 if (!qinf->head)
628 qinf->head = NULL;
644 qinf->head = qinf->head->next;
655 g_assert (g_queue_peek_head_link (q) == qinf->head);
671 link = q->head;
684 link = q->head;
693 qinf->head = q->head;
704 link = q->head;
711 qinf->head = q->head;
722 if (qinf->head != q->head ||
727 g_assert (qinf->head == q->head);
767 g_assert (g_list_length (q->head) == 1);
768 g_assert (q->head == q->tail);
771 g_assert (q->head->next == q->tail);
772 g_assert (q->tail->prev == q->head);
773 g_assert (g_list_length (q->head) == 2);
776 g_assert (q->head->data == GINT_TO_POINTER (1));
779 g_assert (g_list_length (q->head) == 3);
780 g_assert (q->head->data == GINT_TO_POINTER (1));
781 g_assert (q->head->next->data == GINT_TO_POINTER (2));
782 g_assert (q->head->next->next == q->tail);
783 g_assert (q->head->next == q->tail->prev);
787 g_assert (g_list_length (q->head) == 4);
788 g_assert (q->head->data == GINT_TO_POINTER (1));
792 g_assert (g_list_length (q->head) == 5);
798 g_assert (q->head->prev == NULL);
799 g_assert (q->head->data == GINT_TO_POINTER (1));
800 g_assert (q->head->next->data == GINT_TO_POINTER (2));
801 g_assert (q->head->next->next->data == GINT_TO_POINTER (3));
802 g_assert (q->head->next->next->next->data == GINT_TO_POINTER (4));
803 g_assert (q->head->next->next->next->next->data == GINT_TO_POINTER (5));
804 g_assert (q->head->next->next->next->next->next == NULL);
805 g_assert (q->head->next->next->next->next == q->tail);
812 g_assert (q->tail->prev->prev->prev->prev == q->head);
818 g_assert (g_list_length (q->head) == 4 && q->length == 4);
821 g_assert (g_list_length (q->head) == 3);
824 g_assert (g_list_length (q->head) == 2);
827 g_assert (g_list_length (q->head) == 1);
830 g_assert (g_list_length (q->head) == 0);
833 g_assert (g_list_length (q->head) == 0);
836 g_assert (g_list_length (q->head) == 0);
845 g_assert (g_list_length (q->head) == 1 && 1 == q->length);
848 g_assert (g_list_length (q->head) == 2 && 2 == q->length);
851 g_assert (g_list_length (q->head) == 3 && 3 == q->length);
854 g_assert (g_list_length (q->head) == 4 && 4 == q->length);
857 g_assert (g_list_length (q->head) == 5 && 5 == q->length);
861 g_assert (g_list_length (q->head) == 4);
865 g_assert (g_list_length (q->head) == 3);
866 data = q->head->data;
869 g_assert (g_list_length (q->head) == 2);
872 g_assert (g_list_length (q->head) == 1);
873 g_assert (q->head == q->tail);
876 g_assert (g_list_length (q->head) == 0);
881 g_assert (g_list_length (q->head) == 0);
884 g_assert (g_list_length (q->head) == 0);
889 g_assert (g_list_length (q->head) == 0);
894 g_assert (g_list_length (q->head) == 0);
895 g_assert (g_list_length (q2->head) == 0);