summaryrefslogtreecommitdiff
path: root/lib/gl_rbtree_oset.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* rbtree-oset: Pacify GCCPaul Eggert2022-07-311-0/+1
| | | | | | * lib/gl_rbtree_oset.c (gl_rbtree_oset_check_invariants): * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_check_invariants): Add extern decls, to pacify --enable-gcc-warnings with Bison.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* oset: Add an 'iterator_atleast' operation.Bruno Haible2020-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/gl_array_oset.c (gl_array_indexof_atleast): New function, extracted from gl_array_search_atleast. (gl_array_search_atleast): Use it. (gl_array_iterator_atleast): New function. (gl_array_oset_implementation): Use it. * lib/gl_anytree_oset.h (gl_tree_iterator_atleast): New function. * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Use it. * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Likewise. * lib/gl_oset.h (struct gl_oset_implementation): Add 'iterator_atleast' member. (gl_oset_iterator_atleast): New function. * lib/gl_oset.hh (gl_OSet): Add 'begin_atleast' member. (gl_OSet::iterator): Add another auxiliary constructor. * tests/test-array_oset.c (is_at_least, gl_sortedlist_indexof_atleast): New functions. (main): Test also gl_oset_iterator_atleast. * tests/test-avltree_oset.c (is_at_least): New function. (main): Test also gl_oset_iterator_atleast. * tests/test-rbtree_oset.c (is_at_least): New function. (main): Test also gl_oset_iterator_atleast. * tests/test-oset-c++.cc (is_at_most): New function. (main): Test also gl_OSet::begin_atleast.
* oset: Add an 'update' operation.Bruno Haible2020-07-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gl_array_oset.c (gl_array_update): New function. (gl_array_oset_implementation): Use it. * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters. * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters. * lib/gl_avltree_ordered.h (gl_tree_add_node_before): New function, extracted from gl_tree_nx_add_before. (gl_tree_nx_add_before): Invoke it. (gl_tree_add_node_after): New function, extracted from gl_tree_nx_add_after. (gl_tree_nx_add_after): Invoke it. (gl_tree_remove_node_no_free): New function, extracted from gl_tree_remove_node. (gl_tree_remove_node): Invoke it. * lib/gl_rbtree_ordered.h (gl_tree_add_node_before): New function, extracted from gl_tree_nx_add_before. (gl_tree_nx_add_before): Invoke it. (gl_tree_add_node_after): New function, extracted from gl_tree_nx_add_after. (gl_tree_nx_add_after): Invoke it. (gl_tree_remove_node_no_free): New function, extracted from gl_tree_remove_node. (gl_tree_remove_node): Invoke it. * lib/gl_anytree_oset.h (gl_tree_next_node): New function, extracted from gl_tree_iterator_next. (gl_tree_iterator_next): Invoke it. (gl_tree_prev_node, gl_tree_update): New functions. * lib/gl_avltree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters. (gl_avltree_oset_implementation): Use gl_tree_update. * lib/gl_rbtree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters. (gl_rbtree_oset_implementation): Use gl_tree_update. * lib/gl_oset.h (struct gl_oset_implementation): Add 'update' member. (gl_oset_update): New function. * lib/gl_oset.hh (gl_OSet): Add 'update' member. * modules/avltree-oset (configure.ac): Require AC_C_INLINE. * modules/rbtree-oset (configure.ac): Likewise. * tests/test-oset-update.h: New file. * tests/test-array_oset.c: Include test-oset-update.h. (main): Invoke test_update. * tests/test-avltree_oset.c: Likewise. * tests/test-rbtree_oset.c: Likewise. * modules/array-oset-tests (Files): Add tests/test-oset-update.h. * modules/avltree-oset-tests (Files): Likewise. * modules/rbtree-oset-tests (Files): Likewise. * tests/test-oset-c++.cc (action): New function. (main): Test the 'update' member function.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* rbtree-omap: New module.Bruno Haible2018-12-111-758/+15
| | | | | | | | | | | * lib/gl_rbtree_omap.h: New file. * lib/gl_rbtree_omap.c: New file. * lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c. Parameterize. * lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h. * modules/rbtree-omap: New file. * modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h. (Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* array-oset, linkedhash-list, rbtree-oset: no need for 'inline'Paul Eggert2012-11-291-2/+2
| | | | | | | | | | * lib/gl_array_oset.c (gl_array_nx_add_at): (gl_array_remove_at): * lib/gl_linkedhash_list.c (hash_resize_after_add) (add_to_bucket, remove_from_bucket): * lib/gl_rbtree_oset.c (rotate_left, rotate_right): Change 'static inline' to 'static', as it's simpler to omit 'inline' unless there's a significant performance advantage.
* maint: spelling fixesPaul Eggert2012-02-051-1/+1
|
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Move the malloc checking from module 'oset' to new module 'xoset'.Bruno Haible2009-12-141-11/+21
|
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-422/+422
|
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* Add an element disposal function.Bruno Haible2007-03-151-1/+3
|
* Simplify xmalloc expressions. Add overflow check in xmalloc arguments.Bruno Haible2006-11-061-6/+3
|
* Add a search_atleast operation.Bruno Haible2006-10-041-0/+1
|
* Include <config.h> unconditionally.Bruno Haible2006-09-141-3/+1
|
* Ordered set data type implemented by a binary tree.Bruno Haible2006-07-171-0/+807