Example #1
0
/**
 * Construct array from a comma-separated list of strings.
 *
 * @param comma_separated_list the comma-separated list of strings
 * @return constructed array
 */
file_mask_array* file_mask_new_from_list(const char* comma_separated_list)
{
	file_mask_array* vect = file_mask_new();
	file_mask_add_list(vect, comma_separated_list);
	return vect;
}
Example #2
0
/**
 * Process --accept and --crc-accept options.
 *
 * @param o pointer to the options structure to update
 * @param accept_string comma delimited string to parse
 * @param type non-zero for the crc_accept option
 */
static void crc_accept(options_t *o, char* accept_string, unsigned type)
{
	file_mask_array** ptr = (type ? &o->crc_accept : &o->files_accept);
	if(!*ptr) *ptr = file_mask_new();
	file_mask_add_list(*ptr, accept_string);
}