/* Abstract sequential list data type.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
Use #define to avoid a warning because of extern vs. static. */
gl_list_t
-gl_list_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- return implementation->create_empty (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates);
+ return implementation->nx_create_empty (implementation, equals_fn,
+ hashcode_fn, dispose_fn,
+ allow_duplicates);
}
gl_list_t
-gl_list_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- return implementation->create (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates, count, contents);
+ return implementation->nx_create (implementation, equals_fn, hashcode_fn,
+ dispose_fn, allow_duplicates, count,
+ contents);
}
size_t
->node_value (list, node);
}
-void
-gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+int
+gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
- ((const struct gl_list_impl_base *) list)->vtable
- ->node_set_value (list, node, elt);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_nx_set_value (list, node, elt);
}
gl_list_node_t
}
gl_list_node_t
-gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->set_at (list, position, elt);
+ ->nx_set_at (list, position, elt);
}
gl_list_node_t
}
gl_list_node_t
-gl_list_add_first (gl_list_t list, const void *elt)
+gl_list_nx_add_first (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_first (list, elt);
+ ->nx_add_first (list, elt);
}
gl_list_node_t
-gl_list_add_last (gl_list_t list, const void *elt)
+gl_list_nx_add_last (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_last (list, elt);
+ ->nx_add_last (list, elt);
}
gl_list_node_t
-gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_before (list, node, elt);
+ ->nx_add_before (list, node, elt);
}
gl_list_node_t
-gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_after (list, node, elt);
+ ->nx_add_after (list, node, elt);
}
gl_list_node_t
-gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_at (list, position, elt);
+ ->nx_add_at (list, position, elt);
}
bool
}
gl_list_node_t
-gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_add (list, compar, elt);
+ ->sortedlist_nx_add (list, compar, elt);
}
bool