delete_value_from_array_c
status.i4.v = delete_value_from_array_c(array.g.v, num_entries.i4.v,
sizeof_entry.i4.v,
delete_value.g.v
[,fill_entry.g.v]
[,callback_func.f.v]
[,callback_data.f.v]
[,options.u4.v])
This routine will delete a value entry from an array and fills in
requested values at the end of the array.
array array to be manipulated
num_entries number of entries in the array (>= 1)
sizeof_entry size of a single entry (in bytes) (>= 1)
delete_value value to delete
[fill_entry] data to fill in the end of the array with
(default is to fill with zeroes)
[callback_func] address of function to be called for each entry of
the array that is about to be deleted
(called as follows:
action_taken.i4.v = callback_func(entry_number.i4.v,
entry.g.v,
callback_data.g.v)
"entry" is the current array element data
"callback_data" is the caller-supplied callback data)
(default is NULL)
[callback_data] data to be passed to "callback_func"
(default is NULL)
[options] deletion options (not used)
(default is 0)
This function returns ACNET status values as follows:
CLIB_INVARG invalid number of entries or size of entry
otherwise number of values deleted
This function requires the following include files:
cbslib_h, acnet_errors_h
Related functions:
delete_from_array_c, delete_multiple_from_array_c,
array_delete_duplicates_c, array_delete_entries_c,
insert_in_array_c, invert_array_c, array_fill_c,
array_clear_c
C/C++ usage:
int status;
int array[256];
int num_entries = 256;
int sizeof_entry = sizeof(int);
int delete_value = 0;
int fill_entry = 0;
unsigned int options = 0;
void *callback_data = (void *) NULL;
delete_array_value_func callback_func;
status = delete_value_from_array_c((void *) array,num_entries,
sizeof_entry,(void *) &delete_value,
(void *) &fill_entry,callback_func,
callback_data,options);