diff --git a/m-algo.h b/m-algo.h index bbaa532d..01425cc9 100644 --- a/m-algo.h +++ b/m-algo.h @@ -28,7 +28,7 @@ #include "m-core.h" /* Define different kind of basic algorithms named 'name' over the container - which oplist is 'contOp', as static inline functions. + which oplist is 'cont_oplist', as static inline functions. USAGE: ALGO_DEF(algogName, containerOplist|type if oplist has been registered) */ #define M_ALGO_DEF(name, cont_oplist) \ @@ -45,8 +45,9 @@ (M_ALG0_FOR_EACH, M_ALG0_FOR_EACH_ARG) \ (container, M_GLOBAL_OPLIST(cont_oplist), __VA_ARGS__) + /* Map a function (or a macro) to all elements of a container - into another container. + and store it into another container. USAGE: ALGO_TRANSFORM(contDst, contDOplist|type_if_registered_oplist, contSrc, contSrcOplist|type_if_registered_oplist, function[, extra arguments of function]) */ @@ -55,6 +56,7 @@ (M_ALG0_TRANSFORM, M_ALG0_TRANSFORM_ARG) \ (contD, M_GLOBAL_OPLIST(contDop), contS, M_GLOBAL_OPLIST(contSop), __VA_ARGS__) + /* Extract a subset of a container to copy into another container. USAGE: ALGO_EXTRACT(contDst, contDstOplist|type_if_registered_oplist, contSrc, contSrcOplist|type_if_registered_oplist @@ -65,6 +67,7 @@ M_IF_NARGS_EQ2(__VA_ARGS__)(M_ALG0_EXTRACT_FUNC, M_ALG0_EXTRACT_ARG)) \ (contD, contDop, contS, __VA_ARGS__) + /* Perform a Reduce operation over a container. USAGE: ALGO_REDUCE(dstVar, container, contOplist|type_if_registered_oplist, reduceFunc diff --git a/m-bitset.h b/m-bitset.h index f077ebac..c76dc870 100644 --- a/m-bitset.h +++ b/m-bitset.h @@ -64,7 +64,7 @@ typedef uint64_t m_b1tset_limb_ct; typedef struct m_bitset_s { size_t size; // Size is the number of bits size_t alloc; // Alloc is the number of allocated limbs - m_b1tset_limb_ct *ptr; // Pointer to the allocated limbs + m_b1tset_limb_ct *ptr; // Pointer to the allocated limbs } m_bitset_t[1]; /* Pointer to a m_bitset_t */ @@ -77,7 +77,7 @@ typedef const struct m_bitset_s *m_bitset_srcptr; typedef struct m_bitset_it_s { size_t index; // index to the array of bit bool value; // value used for _ref & _cref to store the value - struct m_bitset_s *set; // the associated bitset + struct m_bitset_s *set; // the associated bitset } m_bitset_it_t[1]; /* Initialize a bitset (CONSTRUCTOR) */ diff --git a/m-core.h b/m-core.h index 0d205026..9e16d6c0 100644 --- a/m-core.h +++ b/m-core.h @@ -4444,7 +4444,7 @@ m_core_parse2_enum (const char str[], const char **endptr) M_EMPLACE_ASS_ARRAY_DEF_EXPAND_KEY(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, key_emp_type, val_emp_type) \ M_EMPLACE_ASS_ARRAY_DEF_EXPAND_VAL(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, key_emp_type, val_emp_type) \ M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_B(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(key_emp_type), M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(val_emp_type) ) -/* Transform all forms to the generic LIST form */ +/* Transform all supported user forms to the generic LIST form */ #define M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(val_emp) \ M_IF(M_PARENTHESIS_P(val_emp))(M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_PARENTHESIS, M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_B)(val_emp) #define M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_B(val_emp) \ @@ -4516,7 +4516,11 @@ m_core_parse2_enum (const char str[], const char **endptr) M_EMPLACE_CALL_FUNC(aval, val_init_func, val_oplist, *val, val_emplace_type); \ } \ -/* Generic emplace for a queue like container */ +/* Definition of the emplace_back function for queue. + It is defined here so that this definition is shared accross different + kind of kind of queue. + This definition is far from being efficient but works for the current interface. +*/ #define M_EMPLACE_QUEUE_GENE(name, name_t, function_name, oplist, init_func, exp_emplace_type) \ static inline void \ function_name(name_t v \