/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#include <stdlib.h>
#include <string.h>
/* ---------------------------------------------------------------------
* Auxiliary functions.
* --------------------------------------------------------------------- */
struct list_entry {
void *m_object;
bool m_managed;
};
static
{
return iter;
}
static
{
return iter;
}
static
struct list_entry *
{
} else
return le;
}
static
void
{
}
static
struct list_entry *
struct list_entry *next)
{
}
return le;
}
/* ---------------------------------------------------------------------
* The "atf_list_citer" type.
* --------------------------------------------------------------------- */
/*
* Getters.
*/
const void *
{
}
{
return newciter;
}
bool
const atf_list_citer_t i2)
{
}
/* ---------------------------------------------------------------------
* The "atf_list_iter" type.
* --------------------------------------------------------------------- */
/*
* Getters.
*/
void *
{
}
{
return newiter;
}
bool
const atf_list_iter_t i2)
{
}
/* ---------------------------------------------------------------------
* The "atf_list" type.
* --------------------------------------------------------------------- */
/*
* Constructors and destructors.
*/
{
return atf_no_memory_error();
}
return atf_no_memory_error();
}
l->m_size = 0;
return atf_no_error();
}
void
{
freed = 0;
freed++;
}
}
/*
* Getters.
*/
{
}
{
}
{
return entry_to_iter(l, l->m_end);
}
{
return entry_to_citer(l, l->m_end);
}
void *
{
{
pos++;
}
}
return atf_list_iter_data(iter);
}
const void *
{
{
atf_list_end_c(list))) {
pos++;
}
}
return atf_list_citer_data(iter);
}
{
return l->m_size;
}
char **
{
char **array;
size_t i;
goto out;
i = 0;
goto out;
}
i++;
}
out:
return array;
}
/*
* Modifiers.
*/
{
err = atf_no_memory_error();
else {
l->m_size++;
err = atf_no_error();
}
return err;
}
void
{
}