summaryrefslogtreecommitdiffhomepage
path: root/examples/complex.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-10-24API CHANGE: Renamed input params for naming consisteny and usage:Tyge Løvset
i_key_class TYPE => i_keyclass TYPE i_val_class TYPE => i_valclass TYPE i_key_arcbox TYPE => i_keyboxed TYPE i_val_arcbox TYPE => i_valboxed TYPE i_key_bind, i_val_bind are removed.
2022-10-21Renamed size_t formatting macro c_zu to c_ZU (for replacing %zu on mingw64).Tyge Løvset
2022-10-20Switch from #define i_val_bind to i_val_class and i_key_class.Tyge Løvset
i_val_bind/i_key_bind is deprecated but available for now.
2022-10-14Replaced PRIuMAX with new c_zu macro in examples. "%zu" is not supported by ↵Tyge Løvset
mingw64 and PRIuMAX is not a replacement for "zu".
2022-09-10Internal renamings to discourage use of private struct fields.Tyge Løvset
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-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-04-28Finalized template.h logic.Tyge Løvset
2022-04-27Finally FIXED cloning/to/from scheme to work properly. When using ↵Tyge Løvset
i_key_bind/i_val_bind, a .._clone() function *must* always be defined. Functions .._from and .._toraw is only required when i_keyraw/i_valraw type is defined.
2022-04-18Removed i_drop and i_from template specifiers to reduce redundancies and add ↵Tyge Lovset
clarity (error given if used): use i_valdrop/i_valfrom and i_keydrop/i_keyfrom instead. Added missing at_mut() function to cdeq.
2022-03-04Updated printf formatting to portable code. This was also to use ↵Tyge Løvset
http://winlibs.com gcc+clang with ucrt runtime-libs without warnings.
2022-01-03"gcc/clang -O2 -Wall -std=c99 -pedantic" compiles examples with no warnings. ↵Tyge Løvset
More cleanups.
2021-12-30Renamed c_default_clone to c_default_from (mostly used internally).Tyge Løvset
2021-12-19First commit for Version 3 of STC. Main changes are consistent rename of ↵Tyge Løvset
'_del' to '_drop' and '_compare' to '_cmp'. Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
2021-12-02Breaking changes for i_fwd and i_cmp_none:Tyge Løvset
- Removed: i_cmp_none and i_fwd (replaced by c_no_compare and c_is_fwd args to i_opt). - Added compile-time disabling of clonable and comparable container elements, controlled by i_opt (c_no_clone | c_no_compare) - Added i_opt: can define multiple compile-time options: c_no_compare, c_no_clone, c_no_atomic, c_is_fwd: may be combined with | separator. - Except for csptr, when i_del / i_valdel / i_keydel is defined, also i_from / i_keyfrom / i_valfrom must be defined or i_opt c_no_clone. - For struct elements, either i_cmp must be defined (as before), or define i_opt c_no_compare for non-associative containers.
2021-11-24Deprecated c_no_compare(). Define i_cmp_none instead when you have/want no ↵Tyge Løvset
element comparison for cvec, cdeq, clist, csptr. Will give compile time error if functions depending on comparisons are used.
2021-11-03Changed carrN_X_at() to return const value*. Added mutable carrN_X_elem().Tyge Løvset
2021-10-06Updates to previous commit on cvec and cdeq. Some example improvements.tylo
2021-10-05Changed recommended order of defining template parameters.Tyge Løvset
2021-09-12Some improvements in examples.Tyge Løvset
2021-09-08Updated most examples to newstyle. Some changes in cpque/cstack.Tyge Løvset
2021-05-18Internal updates in cstr. Minor API change in carray carrayNX_with_value() ↵Tyge Løvset
=> carrayNX_with_values(). Docs/examples improvements.
2021-05-07Reverted c_trivial_*() to c_default_*().Tyge Løvset
2021-04-29Added new constructors to carray.h. Made cmap and csmap keys immutable. ↵Tyge Løvset
Added get() method to cmap and csmap.
2021-04-27Renamed carray struct member at to data. Improved cdeq_expand_() method.Tyge Løvset
2021-03-22Rewrote carray.h completely. Somewhat different API, much easier/natural ↵Tyge Løvset
usage. Uses still a contiguous block of memory.
2021-03-21Splitted using_carray() into using_carray2() and using_carray3()Tyge Løvset
2021-02-22Renamed c_plain_... to c_trivial_... internal functions.Tyge Løvset
2021-02-22Many internal renames. Reverted to specify both _del and _clone parameter ↵Tyge Løvset
when giving _del.
2021-02-20Rewamp of cmap/csmap API. More to come.Tyge Løvset
2021-02-04Changed return type it iter_t in csmap_X_find() and cmap_X_find() to be ↵Tyge Løvset
consistent.
2021-01-30Internal changes: removed use of cmap_inits and set_inits. Use cmap_x_init() ↵Tyge Løvset
and cset_X_init(). Minor changes in cvec, csmap, cstr, crandom.
2021-01-24Improved cvec cdeq. Must be initied with cvec_X_init() and cdeq_X_init(). ↵Tyge Løvset
Not cvec_inits. Improved docs.
2021-01-19Changed template args sequence in cmap.Tyge Løvset
2021-01-03Force template argument *clone* to be specified when *del* is specified for ↵Tyge Løvset
containers. Can be *c_no_clone* if clonable is not required.
2021-01-02Major upgrade: Added 'clone' template parameters to containers. Reorganized ↵Tyge Løvset
arg positions. Renamed csptr_X_share() to csptr_X_clone()
2020-12-30API change: Swapped destroy <-> compare function args in using_*() macros ↵Tyge Løvset
for cvec, cdeq, cptr and clist.
2020-11-26Removed stc/cfmt.h, as _Generic requires C11. I have made it a gist: ↵Tyge Løvset
https://gist.github.com/tylov/bcc956a4779f1d14204e66a14f17beb9 All examples are reverted to use printf() instead of c_print().
2020-11-03renamed __init to _initsTyge Løvset
2020-11-02Changed (half)-internal *_INIT to *__init macros. Minor reformatting.Tyge Løvset
2020-10-26Updates examples using cfmt.h c_print().Tyge Løvset
2020-10-14Renamed cstr() constructor to cstr_from(), cstr_from() to cstr_from_fmt().Tyge Løvset
2020-09-18Changed macro to c_forrange (..), iter param first.Tyge Løvset
2020-09-18Changed <container>_ini macro constant to <container>_INIT, and ↵Tyge Løvset
<container>_destroy() to <container>_del.
2020-09-17Fixed range methods in cvec, and renamed typename_<container>(..) to ↵Tyge Løvset
using_<container>(..).
2020-09-16Added some missing templates in cmap.Tyge Løvset
2020-09-16Changed earlier declare_<container>(..) macro to typedef_<container>(..)Tyge Løvset