diff --git a/README.md b/README.md index b7d1296f..d19bd004 100644 --- a/README.md +++ b/README.md @@ -6342,19 +6342,19 @@ from the position 'it2'. Set all elements of the container 'c' to 'value'. -##### void name\_filln(container\_t c, size\_t n, type\_t value) +##### void name\_fill\_n(container\_t c, size\_t n, type\_t value) Set the container to 'n' elements equal to 'value'. This method is defined only if the container exports a PUSH method. -##### void name\_filla(container\_t c, type\_t value, type\_t inc) +##### void name\_fill\_a(container\_t c, type\_t value, type\_t inc) Set all elements of the container 'c' to 'value + i * inc' with i = 0.. size(c) This method is defined only if the base type exports an ADD method. This method is defined only if the container exports a PUSH method. -##### void name\_fillan(container\_t c, size\_t n, type\_t value) +##### void name\_fill\_an(container\_t c, size\_t n, type\_t value) Set the container to 'n' elements to 'value + i * inc' with i = 0..n diff --git a/m-algo.h b/m-algo.h index 1e74b829..97622e50 100644 --- a/m-algo.h +++ b/m-algo.h @@ -268,7 +268,7 @@ \ M_IF_METHOD(PUSH, cont_oplist)( \ static inline void \ - M_C(name, _filln) (container_t l, size_t n, type_t const value) \ + M_C(name, _fill_n) (container_t l, size_t n, type_t const value) \ { \ M_CALL_CLEAN(cont_oplist, l); \ for(size_t i = 0; i < n; i++) { \ @@ -279,7 +279,7 @@ \ M_IF_METHOD(ADD, type_oplist)( \ static inline void \ - M_C(name, _filla) (container_t l, type_t const value, type_t const inc) \ + M_C(name, _fill_a) (container_t l, type_t const value, type_t const inc) \ { \ type_t tmp; \ M_CALL_INIT_SET(type_oplist, tmp, value); \ @@ -292,7 +292,7 @@ \ M_IF_METHOD(PUSH, cont_oplist)( \ static inline void \ - M_C(name, _fillan) (container_t l, size_t n, type_t const value, type_t const inc) \ + M_C(name, _fill_an) (container_t l, size_t n, type_t const value, type_t const inc) \ { \ type_t tmp; \ M_CALL_INIT_SET(type_oplist, tmp, value); \ diff --git a/tests/test-malgo.c b/tests/test-malgo.c index 284e082b..bae6ea23 100644 --- a/tests/test-malgo.c +++ b/tests/test-malgo.c @@ -339,17 +339,17 @@ static void test_array(void) assert(*array_int_get(arr, 1) == 1789); assert(*array_int_get(arr, 2) == 1789); - algo_array_filla(arr, 1789, 1); + algo_array_fill_a(arr, 1789, 1); assert(*array_int_get(arr, 0) == 1789); assert(*array_int_get(arr, 1) == 1790); assert(*array_int_get(arr, 2) == 1791); - algo_array_filla(arr, 0, 2); + algo_array_fill_a(arr, 0, 2); assert(*array_int_get(arr, 0) == 0); assert(*array_int_get(arr, 1) == 2); assert(*array_int_get(arr, 2) == 4); - algo_array_filln(arr, 5, 1742); + algo_array_fill_n(arr, 5, 1742); assert (array_int_size(arr) == 5); assert(*array_int_get(arr, 0) == 1742); assert(*array_int_get(arr, 1) == 1742); @@ -357,7 +357,7 @@ static void test_array(void) assert(*array_int_get(arr, 3) == 1742); assert(*array_int_get(arr, 4) == 1742); - algo_array_fillan(arr, 4, -1, 3); + algo_array_fill_an(arr, 4, -1, 3); assert (array_int_size(arr) == 4); assert(*array_int_get(arr, 0) == -1); assert(*array_int_get(arr, 1) == 2);