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

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rot.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/06 06:08:41 by tgrekov #+# #+# */
/* Updated: 2024/07/16 08:16:38 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file rot.c.

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

Go to the source code of this file.

Functions

static int _rot (t_stack stack)
 Shift all elements in stack down.
 
void rot (t_stack *stack, int mode)
 Shift all elements in stack 1, 2, or both down, depending on whether mode is set to 0, 1, or 2.
 

Function Documentation

◆ _rot()

static int _rot ( t_stack  stack)
static

Shift all elements in stack down.

Parameters
[in,out]stack
Return values
int

Definition at line 29 of file rot.c.

Here is the caller graph for this function:

◆ rot()

void rot ( t_stack stack,
int  mode 
)

Shift all elements in stack 1, 2, or both down, depending on whether mode is set to 0, 1, or 2.

Parameters
[in,out]stack
[in]mode

Definition at line 51 of file rot.c.

References _rot(), and ft_printf().

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