picotm
0.8.0
|
Typedefs | |
typedef size_t(* | picotm_tabwalk_1_function) (void *data0, struct picotm_error *error) |
typedef size_t(* | picotm_tabwalk_2_function) (void *data0, void *data1, struct picotm_error *error) |
typedef size_t(* | picotm_tabwalk_3_function) (void *data0, void *data1, void *data2, struct picotm_error *error) |
typedef int(* | picotm_tab_compare_function) (const void *data0, const void *data1) |
Functions | |
PICOTM_NOTHROW void * | picotm_tabresize (void *base, size_t nelems, size_t newnelems, size_t siz, struct picotm_error *error) |
PICOTM_NOTHROW void | picotm_tabfree (void *base) |
PICOTM_NOTHROW size_t | picotm_tabwalk_1 (void *base, size_t nelems, size_t siz, picotm_tabwalk_1_function walk, struct picotm_error *error) |
PICOTM_NOTHROW size_t | picotm_tabwalk_2 (void *base, size_t nelems, size_t siz, picotm_tabwalk_2_function walk, void *data, struct picotm_error *error) |
PICOTM_NOTHROW size_t | picotm_tabwalk_3 (void *base, size_t nelems, size_t siz, picotm_tabwalk_3_function walk, void *data1, void *data2, struct picotm_error *error) |
PICOTM_NOTHROW size_t | picotm_tabrwalk_1 (void *base, size_t nelems, size_t siz, picotm_tabwalk_1_function walk, struct picotm_error *error) |
PICOTM_NOTHROW size_t | picotm_tabrwalk_2 (void *base, size_t nelems, size_t siz, picotm_tabwalk_2_function walk, void *data, struct picotm_error *error) |
PICOTM_NOTHROW size_t | picotm_tabuniq (void *base, size_t nelems, size_t siz, picotm_tab_compare_function compare) |
typedef int(* picotm_tab_compare_function) (const void *data0, const void *data1) |
Invoked by table functions for comparing two elements.
data0 | A table element. |
data1 | A table element. |
typedef size_t(* picotm_tabwalk_1_function) (void *data0, struct picotm_error *error) |
Invoked by table functions when walking over the elements of a table.
data0 | The table element. | |
[out] | error | Returns an error from the module. |
typedef size_t(* picotm_tabwalk_2_function) (void *data0, void *data1, struct picotm_error *error) |
Invoked by table functions when walking over the elements of a table.
data0 | The table element. | |
data1 | An additional argument. | |
[out] | error | Returns an error from the module. |
typedef size_t(* picotm_tabwalk_3_function) (void *data0, void *data1, void *data2, struct picotm_error *error) |
Invoked by table functions when walking over the elements of a table.
data0 | The table element. | |
data1 | An additional argument. | |
data2 | An additional argument. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW void picotm_tabfree | ( | void * | base | ) |
Free table memory.
base | A pointer to the table's first element. |
PICOTM_NOTHROW void* picotm_tabresize | ( | void * | base, |
size_t | nelems, | ||
size_t | newnelems, | ||
size_t | siz, | ||
struct picotm_error * | error | ||
) |
Allocate or resize table.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
newnelems | The new number of elements in the table. | |
siz | The number of bytes per element. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW size_t picotm_tabrwalk_1 | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tabwalk_1_function | walk, | ||
struct picotm_error * | error | ||
) |
Walk over table in reversed order.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
siz | The number of bytes per element. | |
walk | The call-back function. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW size_t picotm_tabrwalk_2 | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tabwalk_2_function | walk, | ||
void * | data, | ||
struct picotm_error * | error | ||
) |
Walk over table in reversed order.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
siz | The number of bytes per element. | |
walk | The call-back function. | |
data | An additional second argument to the call-back function. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW size_t picotm_tabuniq | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tab_compare_function | compare | ||
) |
Filters out duplicate elements
base | A pointer to the table's first element. |
nelems | The number of elements in the table. |
siz | The number of bytes per element. |
compare | The call-back function for comparing elements. |
PICOTM_NOTHROW size_t picotm_tabwalk_1 | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tabwalk_1_function | walk, | ||
struct picotm_error * | error | ||
) |
Walk over table elements.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
siz | The number of bytes per element. | |
walk | The call-back function. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW size_t picotm_tabwalk_2 | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tabwalk_2_function | walk, | ||
void * | data, | ||
struct picotm_error * | error | ||
) |
Walk over table elements.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
siz | The number of bytes per element. | |
walk | The call-back function. | |
data | An additional second argument to the call-back function. | |
[out] | error | Returns an error from the module. |
PICOTM_NOTHROW size_t picotm_tabwalk_3 | ( | void * | base, |
size_t | nelems, | ||
size_t | siz, | ||
picotm_tabwalk_3_function | walk, | ||
void * | data1, | ||
void * | data2, | ||
struct picotm_error * | error | ||
) |
Walk over table elements.
base | A pointer to the table's first element. | |
nelems | The number of elements in the table. | |
siz | The number of bytes per element. | |
walk | The call-back function. | |
data1 | An additional second argument to the call-back function. | |
data2 | An additional third argument to the call-back function. | |
[out] | error | Returns an error from the module. |