Overview
Welcome to the UAP Common Extensions.
With this library we provide useful data structures and algorithms for common programmatic tasks in the C language. Using the build files you can create a static and a shared lib containing all units, but you may also use the UCX sources in your project and compile specific units by yourself.
If you want to use this library, you can download and install the recent version. The source code is also available as Mercurial repository at our site and on Source Forge.
Authors
Mike Becker <universe@uap-core.de>
Olaf Wintermann <olaf.wintermann@gmail.com>
Other Resources
Changelog
Version 3.1 - 2025-02-11
adds properties.h
adds tree.h
adds json.h
adds locale-independent string to number conversion functions
adds reallocarray() like functions to allocator.h
adds cxIterator() to create iterators over raw C arrays
adds cxIteratorPtr() to create iterators over raw C pointer arrays
adds cx_array_reallocator() and cx_array_default_reallocator
adds several new array and list functions
adds cxBufferReset()
adds cxBufferAppend()
adds cxBufferEnableFlushing() and cxBufferFlush()
adds CX_BUFFER_COPY_ON_WRITE and CX_BUFFER_COPY_ON_EXTEND flags
adds cxBufferWriteFunc and cxBufferReadFunc function pointers (for convenience)
adds cx_cmp_ptr()
adds cx_vcmp_* family of functions
adds cx_sprintf() and several more variants
adds runtime constants to read out the actual SBO sizes
adds improved version of UCX 2 Test framework (now a self-contained header)
adds cx_nmemb() utility function to common.h
changes that CxMap returns own CxMapIterator to save memory in CxIterator
changes name of cxBasicMempoolCreate() to cxMempoolCreateSimple()
changes all functions, for which there is no dedicated xyz_a variant, to accept NULL as allocator argument (in which case a default allocator will be used)
changes the name of destroy functions that actually free the memory to better indicate their behavior
changes cx_strcat variants to allow handling of ENOMEM
changes cx_strcast() to also accept cxstring (and doing nothing in that case)
changes the behavior of cxBufferSeek() to allow offset zero for SEEK_END
moves cx_compare_func typedef to compare.h
moves cx_szmul() to common.h
moves stream copy functions to new streams.h
removes cx_strupper() and cx_strlower() because they only do the right thing in special cases
removes several *_m variants of functions in string.h in favor of automatic conversion
removes utils.h
removes flag_removal function from iterator
removes cxMapDetach() and makes cxMapRemoveAndGet() compatible with both map variants
removes the API for changing the store_pointer property of collections after their creation
removes CMake
removes GTest dependency
removes flags to disable SBO in tests
removes CX_LINKED_LIST_SWAP_SBO_SIZE (it's not really an optimization for linked lists)
fixes cx_strcmp() and cx_strcasecmp() not being useful for lexicographic ordering
fixes cx_hash_key_cxstr() evaluating the argument twice
fixes critical bug that produced wrong results when comparing lists of different type but same size
ends UCX 2.1 long term support
Version 3.0 - 2023-07-09
complete redesign from scratch
collections can now store copies of objects and not just pointers
collections are now dynamically implemented
users of the library can specify own implementations of collections that work with the UCX API
low level API for custom lists that do not use the UCX structures
various fixes and improvements
drops some other, rarely used, features
removes testing implementation from the lib
Version 2.1 - 2019-12-30
adds string replace functions
adds set operations for
UcxList
andUcxMap
adds
sstrcaseprefix()
andsstrcasesuffix()
improves Doxygen documentation in ucx/string.h
adds
UcxArray
data typeadds support for CMake builds, but main build system is still autotools
Version 2.0 - 2018-12-28
some uncritical bug fixes
overflow of
sstrnlen
now returnsSIZE_MAX
instead of zeroadds
scstr_t
- aconst char*
variant for sstr_trenames utility compare functions
Version 1.1 - 2018-05-14
adds missing 32 bit support to integer overflow checks
adds
ucx_buffer_to_sstr()
macroadds
ucx_avl_free_content()
adds some more compare and distance functions in utils.h
adds
SFMT()
andPRIsstr
convenience macrosdestructor functions for
*_free_content()
functions are now optional
Version 1.0.1 - 2018-01-21
some bug fixes
adds integer overflow checks
Version 1.0 - 2017-10-28
first stable version of UCX released