Commit Graph
77 Commits
Author SHA1 Message Date
Patrick Pelissier 6b064870f5 Rename CLEAN operator in RESET operator 2021-10-30 23:26:27 +02:00
Patrick Pelissier e10c3586a3 Rename BITSET & CONCURRENT _clean in _reset to avoid confusing _clean & _clear functions. See #97 2021-10-28 18:13:00 +02:00
Patrick Pelissier 8ce59c2e9d Maintenance:
* update comments
* simplify code.
2021-08-07 00:34:18 +02:00
Patrick Pelissier 0edb6165b5 Fix buffer overflow if size=64*N 2021-03-13 23:39:26 +01:00
Patrick Pelissier 7b2e242c94 Add function bitset_popcount 2021-02-22 12:06:46 +01:00
Patrick Pelissier a82f2ba065 * Fix an issue in _pop_at. * Optimize code by ensuring that the last limbs is always properly masked (simplify algorithm) 2021-02-22 11:31:49 +01:00
Patrick Pelissier 709168652a Reformat and specify clz for bitset size = 0 2021-02-21 21:41:51 +01:00
Patrick Pelissier 517da1b999 Rename generated internal functions
to avoid "poluting" userspace naming.
2021-02-13 11:45:05 +01:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier 1b4c608087 Rename operator TEST_EMPTY into EMPTY_P to be compliant with iterator operator 2021-01-07 22:13:10 +01:00
Patrick Pelissier ad16b310e1 Fix overflow issue in bitset_last_p (see #81) 2020-12-21 15:08:19 +01:00
Patrick Pelissier a29682ca29 Create M_ASSERT macro to encapsulate assert within M*LIB
The goal is to enable the user to override this macro if needed so that it can enable or disable the M*LIB witout impacting its own assertions.
2020-10-29 22:46:17 +01:00
Patrick Pelissier 201cc45fd8 Use of M_ASSERT_INDEX for bitset. 2020-10-23 21:37:44 +02:00
Patrick Pelissier 54d4b80368 Reformat macro to 80 characters 2020-10-21 23:23:40 +02:00
Patrick Pelissier b3a1a75f6f Rename internal types:
a suffix ending with _ct means confidential type
ans is reserved for M*LIB internal usage.

OPLIST doesn't use the external types
but rather the internal types.
It enables to be independent of the real names
of the external types.
Such external names are planned to be fully customizable
(i.e. the user may define a name that suits its coding style)
2020-10-03 14:07:14 +02:00
Patrick Pelissier ab98577deb Fix warning 2020-07-04 12:50:34 +02:00
Patrick Pelissier f2a06ede62 Add mechanism to disable temporary compiler warnings in a sequence of code. 2020-07-01 11:47:55 +02:00
Patrick Pelissier 279b46b4e2 Fix -Wsign-conversion warnings. 2020-06-13 19:43:38 +02:00
Patrick Pelissier 294e45c7e1 Add comments 2020-05-31 00:15:46 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier b9aebf875e Update comments. 2019-03-31 22:36:52 +02:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier a8620c3aff Export method _size for operator GET_SIZE 2018-11-25 18:00:47 +01:00
Patrick Pelissier 02d4bf0e09 Export method _empty_p for operator TEST_EMPTY for all containers. 2018-10-29 11:06:54 +01:00
Patrick Pelissier b52222cad9 Add operator INIT_WITH for oplist with PUSH. 2018-09-01 21:22:18 +02:00
Patrick Pelissier cbb08bdcfc Amend previous commit. 2018-08-19 20:28:46 +02:00
Patrick Pelissier 0de829741a Add synonimous for pointers. 2018-08-19 20:27:45 +02:00
Patrick Pelissier 39ffe1c95a Fix issue for 32 bits build due to previous modification of limb size to 64 bits. 2018-07-29 19:40:08 +02:00
Patrick Pelissier dbe8817d95 Add bitset_clz 2018-07-27 06:19:54 +02:00
Patrick Pelissier 4b8779d8d3 Update formula for increasing the size. 2018-07-24 00:24:50 +02:00
Patrick Pelissier 96202aa78f Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers) 2018-07-14 14:35:14 +02:00
Patrick Pelissier 397f75a4db Add missing method _front for bitset. 2018-06-27 07:33:23 +02:00
Patrick Pelissier 64080fadd3 Update comments. 2018-05-03 13:07:52 +02:00
Patrick Pelissier 839c1af124 Export _parse_str function. 2018-05-03 13:04:04 +02:00
Patrick Pelissier 6b24842704 Add _parse_str interface.
Rewrite _set_str to use the _parse_str
2018-05-03 12:59:58 +02:00
Patrick Pelissier 1753ddc4d6 Improve bitset_at version by avoiding a redundant variable shift. 2018-02-16 20:42:42 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 4e96517bb2 Add init to 0 to unitialized memory as raised by scan-build. 2017-09-26 22:42:09 +02:00
Patrick Pelissier 2bdbd2f864 Fix issue with convertion from unsigned int to unsigned long:
missing cast to handle 1UL properly.
2017-09-26 22:24:53 +02:00
Patrick Pelissier b998e884ce Change limb from int to long to get more efficient. 2017-09-17 10:42:35 +02:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier e80a9b8bb3 Add bitset_t as a global oplist. 2017-09-14 23:02:33 +02:00
Patrick Pelissier 42949f3864 Simplify(bis) 2017-08-19 21:10:45 +02:00
Patrick Pelissier ebfc5615fc Simplify loop of _in_str 2017-08-19 21:10:26 +02:00
Patrick Pelissier 44cdfa0c77 Remove use of feof and ferror as it is not needed as the return of fgetc
is sufficent.
2017-08-19 21:05:55 +02:00
Patrick Pelissier ffc383884d Add macro M_HASH_FINAL 2017-08-17 20:22:01 +02:00
Patrick Pelissier 5f1bfe9117 Add new function flip_at 2017-08-15 21:32:29 +02:00
Patrick Pelissier e84961fa77 Add protecftion against overflow.
Update contact.
2017-08-14 20:46:51 +02:00
Patrick Pelissier 513727dcf8 Update.
Do not import m-string automatically.
2017-08-14 19:36:52 +02:00
Patrick Pelissier 63dfa68319 Update 2017-08-14 19:28:25 +02:00