minishell
ft_sort.h File Reference
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for ft_sort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef int(* t_compar) (const void *, const void *)
 

Functions

bool ft_qsort (void *base, size_t nmemb, size_t memb_size, t_compar compar)
 

Typedef Documentation

◆ t_compar

typedef int(* t_compar) (const void *, const void *)

Definition at line 22 of file ft_sort.h.

Function Documentation

◆ ft_qsort()

bool ft_qsort ( void *  base,
size_t  nmemb,
size_t  memb_size,
t_compar  compar 
)

Definition at line 50 of file ft_qsort.c.

51 {
52  if (!can_mulp(nmemb, memb_size))
53  return (false);
54  _ft_qsort((unsigned char *)base, nmemb, memb_size, compar);
55  return (true);
56 }
bool can_mulp(size_t a, size_t b)
Definition: can_mul.c:50
void _ft_qsort(unsigned char *base, size_t nmemb, size_t memb_size, t_compar compar)
Definition: ft_qsort.c:25
Here is the call graph for this function: