Minishell
 
Loading...
Searching...
No Matches
garbage_utils.c File Reference
#include "garbage.h"
#include "ft_printf.h"
#include "libft.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for garbage_utils.c:

Functions

char * ft_strndup_gb (t_garbage *garbage, const char *source, size_t len)
 Create a copy of source into a new pointer of size len NEEDS to be freed.
 
char * ft_strdup_gb (t_garbage *garbage, const char *source)
 Create a copy of source into a new pointer NEEDS to be freed.
 
void free_element_gb (t_garbage *garbage, void *ptr)
 Free an element in the garbage collector.
 
void print_garbage (t_garbage *garbage)
 Print the garbage collector.
 

Function Documentation

◆ ft_strndup_gb()

char * ft_strndup_gb ( t_garbage * garbage,
const char * source,
size_t len )

Create a copy of source into a new pointer of size len NEEDS to be freed.

Parameters
garbagegarbage structure
sourcestring to copy
lensize of the new string
Returns
char* pointer to the new string
Here is the call graph for this function: