-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush.c
More file actions
25 lines (23 loc) · 1.13 KB
/
push.c
File metadata and controls
25 lines (23 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* :::::::: */
/* push.c :+: :+: */
/* +:+ */
/* By: lorenasmienk <lorenasmienk@student.coda +#+ */
/* +#+ */
/* Created: 2019/12/26 12:34:33 by lorenasmien #+# #+# */
/* Updated: 2019/12/28 13:11:32 by lsmienk ######## odam.nl */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void push(t_stack *take, t_stack *put, char x)
{
put->stack[put->len] = take->stack[take->len - 1];
take->stack[take->len - 1] = 0;
put->len++;
take->len--;
if (x == 'a')
ft_printf("pa\n");
if (x == 'b')
ft_printf("pb\n");
}