summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbits.h
AgeCommit message (Collapse)Author
2023-07-15Improved warning, and other enhancements in ccommon.htylov
2023-07-12Changed docs and examples to use i_key* template parameters instead of ↵tylov
i_val* for all non-maps. Renamed c_ASSERT() to c_assert() and added optional message parameter to c_static_assert().
2023-07-07Issue #62: Fixed wrong printf format specifiers. Changed cbits.h to use long ↵Tyge Løvset
long (guaranteed at least 64-bit) instead of int64_t for easier print. Second part of #62 is due to a clang compiler bug, can be avoided by using c_foreach instead of c_forpair.
2023-06-09Fixed issues with linking params i_implement, i_extern.Tyge Løvset
2023-05-23Some house holding cleanup.Tyge Løvset
2023-05-19Minor cbits change.Tyge Lovset
2023-05-01Remove warnings when using -Wextra.Tyge Løvset
2023-04-18Removed unneeded custom size type in maps and bits.h. Prepared for possible ↵Tyge Løvset
robin-hood impl. Improved sso_bench.c testing string hash - twice as fast as m.ankeln robin impl !?.
2023-03-26Remove more c_with, c_autoTyge Løvset
2023-02-23Internal updates.Tyge Løvset
2023-02-15Cleaned up in size-types. API always uses intptr_t as default for all ↵Tyge Løvset
containers.
2023-02-13Docs update and improvementsTyge Løvset
2023-02-08Changed to use lowercase flow-control macros in examples (uppercase will ↵Tyge Løvset
still be supported). Improved many examples to use c_make() to init containers.
2023-02-07Added custom allocator per container type.Tyge Løvset
2023-02-04Fix in ccommon.h to make MSVC work again (without -std:c11) + small adjustments.Tyge Løvset
2023-01-31Converted all containers but the maps and examples to signed sizes and indices.Tyge Løvset
2023-01-31Reverted c_MALLOC, c_CALLOC, c_REALLOC and c_FREE to lowercase.Tyge Løvset
2023-01-27(Reverted) c_COMPOUND() to c_LITERAL().Tyge Løvset
2023-01-19Finish last commit. Most safe function macros are now preferred lowercase, ↵Tyge Løvset
whereas flow control macros (c_FOREACH, ..) are preferred uppercase.
2023-01-04Bump to 2023Tyge Løvset
2022-12-31Internally renamed ccommon.h macros to uppercase. Lowercase macros are still ↵Tyge Løvset
supported via include/stc/priv/lowcase.h.
2022-12-19Some "internal" macros in ccommon.h made all caps.Tyge Løvset
2022-12-19Renames:Tyge Løvset
cstr_null => cstr_NULL csview_null => csview_NULL cstr_npos => c_NPOS csview_npos => c_NPOS c_ARGsv(sv) => c_ARGSV(sv) c_init(x) => c_INIT(x)
2022-12-05Minor corrections/changes.Tyge Løvset
2022-11-22Fixes of -Wconversion warnings (not examples).Tyge Løvset
2022-11-06Added c_autodrop() macro, and removed c_autobuf() which wasn't that useful ↵Tyge Løvset
(and was undocumented).
2022-10-28Renamed semi-internal macro (used for c++ compability) c_make => c_init.Tyge Løvset
2022-10-19Reverted back to c_forrrange from c_forloop. Still available but deprecated.Tyge Løvset
2022-10-12Minor change in cbits print to str.Tyge Løvset
2022-09-26DEPRECATED: c_forrange(): replaced with c_forloop(). This uses 'long long' ↵Tyge Løvset
as iter type, i.e. "%lld" printf format. crange_from() renamed to crange_make(). More docs.
2022-09-20Minor API change for fixed size cstack and cbits only.Tyge Løvset
2022-09-10Renamed template parameter i_cap => i_capacityTyge Løvset
2022-08-13Experimental: Renamed c_autovar => c_with, c_autoscope => c_scope, ↵Tyge Løvset
c_autodefer => c_defer. May or may not be reverted before V4.0 release.
2022-07-28Simplified cbits.h to only use inline function. Commonly used functions are ↵Tyge Løvset
small.
2022-07-06Version 3.7. Make sure to check NEWS/Changes in README.md for a few ↵Tyge Løvset
code-breaking API changes.
2022-06-01Reverted to default static linkage of non-templated symbols (cstr, csview, ↵Tyge Løvset
..), as it gives smaller executables and is convenient for small applications. (no need to define i_implement when functions is used in one translaton unit only).
2022-06-01Converted all files with DOS line endings to LINUX.Tyge Løvset
2022-06-01Added src/libstc.c which implements all non-templated functions (e.g. from ↵Tyge Løvset
cstr, csview, cbits, crandom), but also clist.h mergesort. - Linking with this object file eliminates the need to define i_implement in one file for these types (or i_extern for non-templated functions in templated container, currently only clist.h)
2022-05-30Done refactoring:Tyge Løvset
- Non-templated types (cstr, csview, cbits, crandom) have no longer default static linking. Now i_header is defined, i.e. files are as headers only. ==> Define `i_implement` before file inclusion. Still possible to do static linkage by defining `i_static` before inclusion or global STC_STATIC. - Templated containers still have static linkage by default. - Renamed csview_substr(), csview_slice() to csview_substr_ex(), csview_slice_ex(). Added simpler inlined csview_substr(), csview_slice().
2022-05-30Large refactoring on strings / utf8 and some file structure.Tyge Lovset
2022-05-25Final reorg of cbits.h. This was really an experiment to make it dual ↵Tyge Løvset
fixed-sized and dynamic.
2022-05-24API change: cbits now uses container pointers args in all member functions, ↵Tyge Løvset
except clone() ... for now. All containers may get same treatment! which will be a rather big API change. This was needed after testing fixed size cbits performance with pass-by-value: was very slow for large bitsets: now faster than std::bitset<>. Also reverted previous cbits_set_value(): much faster because it is branchless.
2022-05-23Small simplify in cbits.hTyge Løvset
2022-05-23Finished cbits.h ; only inlined funcs are templated.Tyge Løvset
2022-05-22Rewrote cbits to make it dual: fixed-sized or dynamically sized by adding ↵Tyge Løvset
optional i_len template parameter. Renamed cbits_set_values() to cbits_set_pattern(). Added example bits2.c
2022-04-28_i_implement moved to user-level template parameter as i_implement. Removed ↵Tyge Løvset
i_opt flag c_implement. Removed OLD include/alt/clist.h
2022-04-07More refactoring of cbits.h + minor changes in examples/benchmark.Tyge Løvset
2022-04-06Refactoring cbits.h and sso alt/cstr.hTyge Løvset
2022-03-04Replaced c_strlit type with c_strlen_lit(lit) macro and its usage.Tyge Løvset
2022-01-08Moved utf8 from cregex.h to separate file. Splitted csview.h into another ↵Tyge Løvset
file strings.h.