Next: String Key Variable Size Value Array Search Library, Previous: String Key Variable Size Value Array Definitions, Up: String Key Variable Size Value Array Interface [Index]
int x1f4_call_??note(unsigned *)
sets $1 to the number of bytes required by an ??note
object (sort of
sizeof(??note))
returns 0
int x1f4_case_??note(void *)
returns 0 if the $1 associative array is empty, non zero otherwise
int x1f4_cast_??bill(void *, const char *, unsigned)
looks for some $1 associative array node matching the $3 bytes long $2 name. Upon look up success, deletes the found associative array element.
same as x1f4_pass_??bill
except for return
returns 0 for success (deletion success that is), X1f4_??NOTE_MISS_CLASS
for nonexistent matching node, one of the defined errors for failure
int x1f4_cast_??note(void *, const char *)
looks for some $1 associative array node matching the $2 name. Upon look up success, deletes the found associative array element.
same as x1f4_pass_??note
except for return
returns 0 for success (deletion success that is), X1f4_??NOTE_MISS_CLASS
for nonexistent matching node, one of the defined errors for failure
int x1f4_drop_??note (void *, const char *, void *, int (*)(void *, void *))
deletes the $1 associative array elements corresponding keys prefixed by $2 if $4 called with $3 and the start address data of the to be removed element returns 0.
returns 0 for success (deletion success that is), X1f4_??NOTE_MISS_CLASS
for no matching node, one of the defined errors for failure
int x1f4_ever_??note(void *, void **)
stores the start address of the $1 associative array last element at $2
returns 0 for success, one of the defined errors for failure
int x1f4_fast_??note(void *, unsigned, struct x1f4_??note_type *)
sets up a newly allocated ??note
object, stored at $1, according the $2
bits (see ??note
attribute bit definitions) and $3 setup values
The setup values in the struct x1f4_??note_type
record pointed to by
the $3 argument are only used if so requested by $2, the $3 argument is not
considered otherwise.
See String Key Variable Size Value Array Types.
See String Key Variable Size Value Array Definitions.
returns 0 for success, one of the defined errors for failure
int x1f4_find_??bill(void *, const char *, unsigned, void **)
looks for some $1 associative array node matching the $3 bytes long $2 name. Upon success, the start address of the found element is stored at $4.
returns 0 if no match was found, non zero otherwise
int x1f4_find_??note(void *, const char *, void **)
looks for some $1 associative array node matching the $2 name. Upon success, the start address of the found element is stored at $3.
returns 0 if no match was found, non zero otherwise
int x1f4_fini_??note(void **)
destroys the associative array whose address is stored at $1 - dismantles it all and frees the bst object
returns 0 for success, one of the defined errors for failure
int x1f4_flat_??note(void *)
dismantles the $1 associative array without freeing the memory for the array object
returns 0 for success, one of the defined errors for failure
int x1f4_flow_??note(void *)
checks the $1 associative array for integrity - useful only for debugging this library
return 0 for success, non 0 for failure to complete the integrity tests
int x1f4_fold_??note(void *, void **, const char **, unsigned *)
stores the start address of the $1 associative array last element at $2 and the start address and size of its corresponding key at $3 and $4, respectively
returns 0 for success, one of the defined errors for failure
int x1f4_high_??note(void *)
empties the $1 associative array (removes all nodes / content)
returns 0 for success, one of the defined errors for failure
int x1f4_hike_??note(void *, void **, const char **, unsigned *)
stores the start address of the $1 associative array first element at $2 and the start address and size of its corresponding key at $3 and $4, respectively
returns 0 for success, one of the defined errors for failure
int x1f4_init_??note(void **, unsigned, struct x1f4_??note_type *)
creates a ??note
object, according the $2 bits (see ??note
attribute bit definitions) and $3 setup values and stores the address of the
newly created associative array at $1
The setup values in the struct x1f4_??note_type
record pointed to by
the $3 argument are only used if so requested by $2, the $3 argument is not
considered otherwise.
See String Key Variable Size Value Array Types.
See String Key Variable Size Value Array Definitions.
returns 0 for success, one of the defined errors for failure
int x1f4_join_??note(void *, void *)
moves all content of the $2 associative array to the $1 associative array. The two collections are assumed of the same memory allocator. The first key of $2 assumed greater than then last key of $1.
int x1f4_lead_??note(void *, void **)
stores the start address of the $1 associative array first element at $2
returns 0 for success, one of the defined errors for failure
int x1f4_lime_??note(void *, void *, int (*)(void *, void *))
calls $3 for each element in the $1 associative array, with $2 and the data for the element as arguments, in this order, until $3 returns non zero
returns 0 if $3 was never called (i.e. the associative array is empty) or if $3 never returned non zero, the non zero return of $3 otherwise
int x1f4_line_??note (void *, void *, int (*)(void *, unsigned *, const void *), int (*)(void *, void *, const void *), int (*)(void *, void *), void *)
copies the content of the $2 associative array in the $1 associative array if $1 is empty. $3 is used to determine the number of bytes to be allocated for a copied element and is passed $6 and the data of the element being copied as the first and third argument. The number of bytes is expected at the address passed as the second argument. Returned value is ignored. $4 is used to copy element data and is passed $6, the data for the copy element and the data for the element being copied as arguments, in this order. If returned value is not zero the associative array copying is aborted. $5 is called to free the copied elements if something went wrong (either no memory was available for the associative array infrastructure or $4 returned non zero) and the copying had to be aborted. It is passed $6 and the data for the element to be freed as arguments, in this order.
$6 is otherwise not used.
if the associative array copying failed efforts are made to return the $1 associative array to its previous (empty) state.
returns 0 for success, one of the defined errors for failure
int x1f4_mind_??note(void *)
removes the first element from the $1 associative array
returns 0 for success, one of the defined errors for failure
int x1f4_note_??note (void *, void *, int (*)(void *, const char *, unsigned))
calls $3 for each element in the $1 associative array, with $2, the name corresponding the element and its size expressed in bytes as arguments, in this order, until $3 returns non zero. The name will be a null terminated string.
returns 0 if $3 was never called (i.e. the associative array is empty) or if $3 never returned non zero, the non zero return of $3 otherwise
int x1f4_pass_??bill(void *, const char *, unsigned)
looks for some $1 associative array node matching the $3 bytes long $2 name. Upon look up success, deletes the found associative array element.
returns 0 for success (deletion success or nonexistent matching node), one of the defined errors for failure
int x1f4_pass_??note(void *, const char *)
looks for some $1 associative array node matching the $2 name. Upon look up success, deletes the found associative array element.
returns 0 for success (deletion success or nonexistent matching node), one of the defined errors for failure
int x1f4_post_??bill(void *, const char *, unsigned, unsigned, void **)
looks for some $1 associative array node matching the $3 bytes long $2 name. Upon look up success, the start address of the found associative array element data is stored at $5. Upon look failure, inserts a new element, corresponding the $3 bytes long $2 key, with $4 usable bytes, and stores the start address of the new element data at $5.
returns 0 if a new element was inserted, X1f4_??NOTE_EVER_MATCH
if a
match was found, one of the defined errors for failure
int x1f4_post_??note(void *, const char *, unsigned, void **)
looks for some $1 associative array node matching the $2 name. Upon look up success, the start address of the found associative array element data is stored at $4. Upon look failure, inserts a new element, corresponding the $2 name, with $3 usable bytes, and stores the start address of the new element data at $4.
returns 0 if a new element was inserted, X1f4_??NOTE_EVER_MATCH
if a
match was found, one of the defined errors for failure
int x1f4_shut_??note (void *, const char *, void *, int (*)(void *, void *))
looks for some $1 associative array node matching the $2 name. Upon look up success, deletes the found associative array element if $4 called with $3 and the start address data of the to be removed element returns 0.
returns 0 for success (deletion success that is), X1f4_??NOTE_MISS_CLASS
for nonexistent matching node, one of the defined errors for failure
(X1f4_??NOTE_CALL_ERROR
is returned if $4 returned non zero)
int x1f4_skew_??note(void *, void *)
replace the memory allocator definition for the $1 associative array with the
one described by the struct x1f4_trans_type
record to be found at $2
address
returns 0
int x1f4_slip_??note(void *)
removes the last element from the $1 associative array
returns 0 for success, one of the defined errors for failure
int x1f4_span_??note (void *, void *, int (*)(void *, void *, const char *, unsigned))
calls $3 for each element in the $1 associative array, with $2, the start address of the element, the name corresponding the element and its size expressed in bytes as arguments, in this order, until $3 returns non zero. The name will be a null terminated string.
returns 0 if $3 was never called (i.e. the associative array is empty) or if $3 never returned non zero, the non zero return of $3 otherwise
int x1f4_swap_??note(void *, void *)
swaps data and settings for the $1 and $2 associative arrays
returns 0 for success
int x1f4_tear_??note(void *, const char *, int, void *)
moves all content starting with the first element matching or greater than $2 if $3 is zero and with the first element greater than $2 if $3 is not zero from the $1 associative array to the empty $4 associative array.
returns 0 for success, one of the defined errors for failure
int x1f4_text_??note (void **, void *, int (*)(void *, unsigned *, const void *), int (*)(void *, void *, const void *), int (*)(void *, void *), void *)
creates a copy of the $2 associative array and stores the address of the newly created associative array at $1.
$3 is used to determine the number of bytes to be allocated for a copied element and is passed $6 and the data of the element being copied as the first and third argument. The number of bytes is expected at the address passed as the second argument. Returned value is ignored. $4 is used to copy element data and is passed $6, the data for the copy element and the data for the element being copied as arguments, in this order. If returned value is not zero the associative array copying is aborted. $5 is called to free the copied elements if something went wrong (either no memory was available for the associative array infrastructure or $4 returned non zero) and the copying had to be aborted. It is passed $6 and the data for the element to be freed as arguments, in this order.
$6 is otherwise not used.
returns 0 for success, one of the defined errors for failure