minishell
vect_push_back.c File Reference
#include "ft_vect.h"
Include dependency graph for vect_push_back.c:

Go to the source code of this file.

Functions

bool vect_push_back (t_vect *vect, const void *elem, size_t *written_index)
 

Function Documentation

◆ vect_push_back()

bool vect_push_back ( t_vect vect,
const void *  elem,
size_t *  written_index 
)

Definition at line 15 of file vect_push_back.c.

16 {
17  size_t index;
18 
19  index = vect->len;
20  if (!vect_set(vect, elem, index))
21  return (false);
22  if (written_index != NULL)
23  *written_index = index;
24  return (true);
25 }
bool vect_set(t_vect *vect, const void *elem, size_t index)
Definition: vect_set.c:16
size_t len
Definition: ft_vect.h:26
Here is the call graph for this function: