![]() |
tgrekov-pipex
HIVE pipex May 2024
|
Definition in file dedupe.c.
#include <stdlib.h>#include <libft.h>#include "utils.h"Go to the source code of this file.
Functions | |
| void ** | dedupe (void **arr, int(*compare)(void *, void *), void *(*copy)(void *)) |
Create new null-terminated array containing only unique values from arr, checked with compare, and copied with copy. | |
| void ** dedupe | ( | void ** | arr, |
| int(*)(void *, void *) | compare, | ||
| void *(*)(void *) | copy | ||
| ) |
Create new null-terminated array containing only unique values from arr, checked with compare, and copied with copy.
| arr | Array to deduplicate |
| compare | Function that compares two void *, returning 0 if they match |
| copy | Function that creates and returns a duplicate of it's void * argument |
| void** | New, deduplicated null-terminated array |
Definition at line 35 of file dedupe.c.
References arr_cut(), arr_free(), arr_has(), arr_len(), compare(), copy(), err(), and ft_calloc().