summaryrefslogtreecommitdiffhomepage
path: root/examples/phonebook.c
AgeCommit message (Collapse)Author
2022-12-20Restructured folders: examples, benchmarks, tests into misc folder.Tyge Lovset
2022-09-26Deprecated c_pair() macro. Replaced with c_PAIR(), analogous to c_ARGsv() ↵Tyge Løvset
macro which are both unsafe regarding side effects on arg.
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-18Converted all example to use cstr_str(&s) instead of s.str to allow SSO ↵Tyge Løvset
string. Fixed misc warnings.
2022-01-03"gcc/clang -O2 -Wall -std=c99 -pedantic" compiles examples with no warnings. ↵Tyge Løvset
More cleanups.
2021-12-29Removed warnings for MS cl -W2 and clang -pedantic -std=c99. No functional ↵Tyge Løvset
changes.
2021-12-22Renamed '_rawvalue\b' to '_raw'Tyge Løvset
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-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-09Made c_static_assert() C99 compatible (which was the point of it).Tyge Løvset
2021-09-08Updated rest of examples, except cqueue.cTyge Løvset
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-05-15API change: Renamed c_init() to c_var() to better describe it declares and ↵Tyge Løvset
initializes a container variable. Will create a version 2.0 RC release soon.
2021-03-30Moved cset and csset definitions to cset.h and csset.h. Updated docs.Tyge Løvset
2021-02-21Renamed emplace_put() to emplace_or_assign(). May add put() as alias to ↵Tyge Løvset
insert_or_assign().
2021-02-20Rewamp of cmap/csmap API. More to come.Tyge Løvset
2021-02-06Some API changes in cmap. Will do for csmap as well.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-21Reverted namings: crand to crandom, and copt to coption.Tyge Løvset
2021-01-20Improved README.mdTyge Løvset
2020-12-17API change: Reverted back to original name used for .val in iterators to .refTyge Løvset
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-24Changed iter.get to iter.val member. Internal, but used external. Will not ↵Tyge Løvset
change again.
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-16Changed API to conform with std:: containers. cmap now only use first, ↵Tyge Løvset
second. for result and value types.
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-11Some renaming of functions, API changes in list and vec.Tyge Løvset
2020-09-06Renamed push_****(), _insert() to _emplace(). added insert_or_assign(), etc.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-02Rewrote cpqueue to a real adapter class. Added some missing functions in ↵Tyge Løvset
cvec, clist, cmap. Added c_init() and c_destroy() generic algoritms on containers.