src/list.c
int
list_equal(
    list_T	*l1,
    list_T	*l2,
    int		ic,	// ignore case for strings
    int		recursive)  // TRUE when used recursively
{
    listitem_T	*item1, *item2;

    if (l1 == NULL || l2 == NULL)
	return FALSE;
    if (l1 == l2)
	return TRUE;
    if (list_len(l1) != list_len(l2))
	return FALSE;

    range_list_materialize(l1);
    range_list_materialize(l2);

    for (item1 = l1->lv_first, item2 = l2->lv_first;
	    item1 != NULL && item2 != NULL;
			       item1 = item1->li_next, item2 = item2->li_next)
	if (!tv_equal(&item1->li_tv, &item2->li_tv, ic, recursive))
	    return FALSE;
    return item1 == NULL && item2 == NULL;
}
/*
 * Return TRUE when two lists have exactly the same values.
 */
Return TRUE when two lists have exactly the same values.
Return TRUE when two lists have exactly the same values .
int
list_equal(
    list_T	*l1,
    list_T	*l2,
    int		ic,	
    int		recursive)  
{
    listitem_T	*item1, *item2;
    if (l1 == NULL || l2 == NULL)
	return FALSE;
    if (l1 == l2)
	return TRUE;
    if (list_len(l1) != list_len(l2))
	return FALSE;
    range_list_materialize(l1);
    range_list_materialize(l2);
    for (item1 = l1->lv_first, item2 = l2->lv_first;
	    item1 != NULL && item2 != NULL;
			       item1 = item1->li_next, item2 = item2->li_next)
	if (!tv_equal(&item1->li_tv, &item2->li_tv, ic, recursive))
	    return FALSE;
    return item1 == NULL && item2 == NULL;
}
int list_equal ( list_T * l1 , list_T * l2 , int ic , int recursive ) { listitem_T * item1 , * item2 ; if ( l1 == NULL || l2 == NULL ) return FALSE ; if ( l1 == l2 ) return TRUE ; if ( list_len ( l1 ) != list_len ( l2 ) ) return FALSE ; range_list_materialize ( l1 ) ; range_list_materialize ( l2 ) ; for ( item1 = l1 -> lv_first , item2 = l2 -> lv_first ; item1 != NULL && item2 != NULL ; item1 = item1 -> li_next , item2 = item2 -> li_next ) if ( ! tv_equal ( & item1 -> li_tv , & item2 -> li_tv , ic , recursive ) ) return FALSE ; return item1 == NULL && item2 == NULL ; }
Return TRUE when two lists have exactly the same values.
Return TRUE when two lists have exactly the same values .
// ignore case for strings // TRUE when used recursively