Ejemplo n.º 1
0
void
ft_set_programs(matcher_t *matcher, const char programs[], int for_x, int in_x)
{
	assoc_records_t prog_records = parse_command_list(programs, 1);
	assoc_programs(matcher, &prog_records, for_x, in_x);
	ft_assoc_records_free(&prog_records);
}
Ejemplo n.º 2
0
void
set_programs(const char patterns[], const char programs[], int for_x, int in_x)
{
    char *exptr;
    char *ex_copy = strdup(patterns);
    char *free_this = ex_copy;
    while((exptr = strchr(ex_copy, ',')) != NULL)
    {
        *exptr = '\0';

        assoc_programs(ex_copy, programs, for_x, in_x);

        ex_copy = exptr + 1;
    }
    assoc_programs(ex_copy, programs, for_x, in_x);
    free(free_this);
}