summaryrefslogtreecommitdiffhomepage
path: root/examples/priority.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-12-19Some "internal" macros in ccommon.h made all caps.Tyge Løvset
2022-10-21Renamed size_t formatting macro c_zu to c_ZU (for replacing %zu on mingw64).Tyge Løvset
2022-10-19Reverted back to c_forrrange from c_forloop. Still available but deprecated.Tyge Løvset
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-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-23Deprecated c_forarray, c_forarray_p macros - both replaced by c_forlist, and ↵Tyge Løvset
is consistent with other c_for* macros.
2022-08-06c_apply() deprecated: replaced with c_forarray() macro. Updated and improved ↵Tyge Løvset
README.md docs.
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-05-22Changed c_apply(v, ..) macro to make it more consistent with c_apply_arr(v, ↵Tyge Løvset
..) and c_foreach (i, ..): v changed to a pointer - not value. Note: also c_pair(v) is changed correspondingly, so usage with c_apply(v) is unchanged.
2022-04-18crandom.h: Renamed *_init(..) functions to *_new(..). Old names are kept but ↵Tyge Løvset
deprecated.
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.
2021-12-22Changed the c_apply() and c_apply_pair() to one new c_apply() API. Added ↵Tyge Løvset
c_pair(v) for convenience.
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-10-05Changed recommended order of defining template parameters.Tyge Løvset
2021-09-23Cleanup: Replaced c_emplace() macro with more general ↵Tyge Løvset
c_apply()/c_apply_pair() macros, and removed c_var() macro. Removed CX_emplace_items() member functions in containers used by c_emplace().
2021-09-20Renamed macros: breaking changes for Version 2.0!Tyge Lovset
c_forvar => c_autovar c_forscope => c_autoscope c_forauto => c_auto Removed: c_fordefer(x); use c_forscope(0, x) instead. Added: c_exitauto; // continue
2021-09-08Updated most examples to newstyle. Some changes in cpque/cstack.Tyge Løvset
2021-08-25BREAKING CHANGE: c_forvar_initdel() macro renamed to c_forauto().tylo
Updated doc and improved csmap_erase.c example.
2021-05-24Split c_fordefer() into c_forvar() and c_fordefer() macros.Tyge Løvset
2021-05-24Renamed c_with => c_fordefer, and removed c_withvar. Macros were too ↵Tyge Løvset
deceiving and hid the fact that it was for-loops. Now it is more explicit.
2021-05-18Added the new c_defer(), c_with(), c_withvar() macros into the examples.Tyge Løvset
2021-04-17Changed c_emplace_items(&cont, ctype, {...}) macro with c_emplace(ctype, ↵Tyge Løvset
cont, {...}): consistent with c_init(ctype, cont, {...}).
2021-03-26Changed cpque declaration to using_cpque(X, Value, valueCompare), and ↵Tyge Løvset
valueCompare optional: more consistent with STC conventions.
2021-02-21Renamed emplace_put() to emplace_or_assign(). May add put() as alias to ↵Tyge Løvset
insert_or_assign().
2021-02-20Renamed push_items to emplace_nTyge Løvset
2021-01-21Reverted namings: crand to crandom, and copt to coption.Tyge Løvset
2020-12-28Reverted crand.h API back to rename crand_* to stc64_*, and crand_next() -> ↵Tyge Løvset
stc64_rand().
2020-12-17Renamed cpqueue (priority queue) container to cpque.Tyge Løvset
2020-12-16Renamed crandom to crand, including renaming of relevant files.Tyge Løvset
2020-12-16Reverted back API to easier naming scheme of crandom.h types and methods.Tyge Løvset
Highly optimized generation of unbiased uniform bounded random numbers. Only 33% overhead.
2020-12-14Reworked the crandom.h module. Changed API (sorry!), made uniform distr. ↵Tyge Løvset
unbiased. Removed 32-bit pcg32 PRNG.
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-10-26Updates examples using cfmt.h c_print().Tyge Løvset
2020-09-20Added c_foreach (i,N) and c_foreach (N), and updated README.mdTyge Løvset
2020-09-20converted to c_forrange().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-16Changed earlier declare_<container>(..) macro to typedef_<container>(..)Tyge Løvset
2020-09-16Renamed two public macros.Tyge Løvset
2020-09-15Simplified declare_ statement e.g. c_cmap(...)Tyge Løvset
2020-09-15New API Change.Tyge Løvset
2020-09-14Got rid of c_items() macro.Tyge Løvset
2020-09-13reverted back to separate random engine and distribution parameters.Tyge Løvset
2020-09-03Changed constant <container>_init to <container>_ini to avoid conflict with ↵Tyge Løvset
<container>_init() method. Reverted name cprique back to cpqueue.
2020-09-02Added cqueue.h, cstack.h and renamed cpqueue.h to cprique.hTyge Løvset
2020-09-02Added cqueue.h and cstack.h adapters. Updated cpqueue.h API to be more ↵Tyge Løvset
consistent.
2020-09-02Updated pqueue_top() API. Added c_destroy() also working for cstr, cbitmap.Tyge Løvset