diff options
| author | Tyge Løvset <[email protected]> | 2022-09-27 13:10:04 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-27 13:10:04 +0200 |
| commit | 57bd093b76083de23af1cfa40be16d166cd440fe (patch) | |
| tree | b7d2e1071fff1d820951199ad8a99137cf428902 | |
| parent | e433a1fc67500ab6bc03c302c01304fd45c72d0e (diff) | |
| parent | ccc1b89c9b65355d10752c3ff7ec4a32cde6d15c (diff) | |
| download | STC-modified-57bd093b76083de23af1cfa40be16d166cd440fe.tar.gz STC-modified-57bd093b76083de23af1cfa40be16d166cd440fe.zip | |
Merge branch 'master' of github.com:tylov/STC
| -rw-r--r-- | README.md | 33 | ||||
| -rw-r--r-- | docs/ccommon_api.md | 2 |
2 files changed, 19 insertions, 16 deletions
@@ -3,9 +3,9 @@ STC - Smart Template Containers for C ===================================== -News: Version 4.0 Release Candidate 2 (Sep 2022) +News: Version 4.0 Release Candidate 3 (Sep 2022) ------------------------------------------------ -- [See detailed changes for version 3](#version-3). +- [See detailed changes for version 4](#version-4). Introduction ------------ @@ -26,6 +26,7 @@ in the future, and do minor modifications. Containers ---------- +- [***ccommon*** - **High-level algorithms on containers**](docs/ccommon_api.md) - [***carc*** - **std::shared_ptr** alike type](docs/carc_api.md) - [***carr2***, ***carr3*** - 2D and 3D **array** types](docs/carray_api.md) - [***cbits*** - **std::bitset** alike type](docs/cbits_api.md) @@ -45,10 +46,9 @@ Containers Others ------ -- [***ccommon*** - RAII and iterator macros](docs/ccommon_api.md) -- [***coption*** - getopt() alike command line args parser](docs/coption_api.md) -- [***crandom*** - A novel very fast *PRNG* named **stc64**](docs/crandom_api.md) - [***cregex*** - Regular expression parser (extended from Rob Pike's regexp9)](docs/cregex_api.md) +- [***crandom*** - A novel very fast *PRNG* named **stc64**](docs/crandom_api.md) +- [***coption*** - getopt() alike command line args parser](docs/coption_api.md) Highlights ---------- @@ -463,20 +463,23 @@ Memory efficiency - **carr2**, **carr3**: Type size: 1 pointer plus dimension variables. Arrays are allocated as one contiguous block of heap memory, and one allocation for pointers of indices to the array. - **carc**: Type size: 2 pointers, one for the data and one for the reference counter. -# Version 3 +# Version 4 -## API changes summary V3.8 - V4.0 +## API changes summary V4.0 - Added **cregex** with documentation - powerful regular expressions. +- Added: `c_forfilter`: Iteration with "piped" filtering using && operator. 4 built-in filters. +- Added: `c_forwhile`: *c_foreach* iteration with extra predicate. +- Added: **crange**: Number generator type, which can be iterated (e.g. with *c_forfilter*). +- Added back **coption** - command line argument parsing. +- New + renamed loop iteration/scope macros: + - `c_forlist`: macro replacing `c_forarray` and `c_apply`. More user friendly. + - `c_forloop`: macro replacing `c_forrange`. Uses 'long long' as iterator type. + - `c_with`: macro renamed from `c_autovar`. Like Python's **with** statement. + - `c_scope`: macro renamed from `c_autoscope`. + - `c_defer`: macro renamed from `c_autodefer`. Resembles Go's and Zig's **defer**. - Updated **cstr**, now always takes self as pointer, like all containers except csview. - Updated **cvec**, **cdeq**, changed `*_range*` function names. -- Added back **coption** - command line argument parsing. -- NEW / DEPRECATED: - - `c_forlist`: macro replacing `c_forarray` and `c_apply` which is deprecated. More user friendly. - - `c_forloop`: macro replacing `c_forrange` which is deprecated. Uses 'long long' as iterator type. - - `c_with`: macro renamed from `c_autovar`, which is deprecated. Like Python's **with** statement. - - `c_scope`: macro renamed from `c_autoscope`, which is deprecated. - - `c_defer`: macro renamed from `c_autodefer`, which is deprecated. Resembles Go's and Zig's **defer**. -- [See detailed changes for version 3](#version-3). +[See detailed changes for version 3](#version-3). ## Changes version 3.8 - Overhauled some **cstr** and **csview** API: diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 2c0ea4c2..40a181dc 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -273,7 +273,7 @@ crange_iter crange_end(crange* self); void crange_next(crange_iter* it); // 1. All primes less than 32: -crange r1 = crange_from(3, 32, 2); +crange r1 = crange_make(3, 32, 2); printf("2"); // first prime c_forfilter (i, crange, r1 , isPrime(*i.ref)) |
