X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgl_list.c;h=919a0cdc1271635186b4ce5c62151a1a414ab12b;hb=c00787b642cb499896ae03a918f13546d24b6552;hp=369615e0b496e97ce14f8054dfb591bf22b96548;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/gl_list.c b/lib/gl_list.c index 369615e0b..919a0cdc1 100644 --- a/lib/gl_list.c +++ b/lib/gl_list.c @@ -1,5 +1,5 @@ /* Abstract sequential list data type. - Copyright (C) 2006-2009 Free Software Foundation, Inc. + Copyright (C) 2006-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -27,26 +27,28 @@ 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 @@ -63,11 +65,12 @@ gl_list_node_value (gl_list_t list, gl_list_node_t node) ->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 @@ -92,10 +95,10 @@ gl_list_get_at (gl_list_t list, size_t position) } 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 @@ -145,38 +148,38 @@ gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, c } 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 @@ -264,10 +267,10 @@ gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, } 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