tgrekov-push_swap
HIVE push_swap July 2024
Loading...
Searching...
No Matches
push.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/06 05:49:10 by tgrekov #+# #+# */
/* Updated: 2024/07/17 08:34:57 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file push.c.

#include <ft_printf.h>
#include "../stack.h"
Include dependency graph for push.c:

Go to the source code of this file.

Functions

static int _push (t_stack *src, t_stack *dst)
 Push the first element out of src out and into dst.
 
void push (t_stack *stack, int mode)
 Push the first element from stack 1 or 2 into the other stack, depending on whether mode is set to 0 or 1.
 

Function Documentation

◆ _push()

static int _push ( t_stack src,
t_stack dst 
)
static

Push the first element out of src out and into dst.

Parameters
[in,out]src
[in,out]dst
Return values
int

Definition at line 30 of file push.c.

Here is the caller graph for this function:

◆ push()

void push ( t_stack stack,
int  mode 
)

Push the first element from stack 1 or 2 into the other stack, depending on whether mode is set to 0 or 1.

Parameters
[in,out]stack
[in]mode

Definition at line 55 of file push.c.

References _push(), and ft_printf().

Here is the call graph for this function:
Here is the caller graph for this function: