push_swap/srcs/ps_push.c
Tanguy MAZE beba6ce86f lazy week-end stuff B)
started conversion of functions to data structure system
still WIP
added first iteration of int parser
does not check for int overflow
2019-02-23 18:35:46 +01:00

22 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ps_push.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/21 15:59:46 by tmaze #+# #+# */
/* Updated: 2019/02/23 15:45:30 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void ps_push(t_psdata *data, char c)
{
t_stack *tmp;
tmp = ps_stkpop(data, (c == 'a') ? c : 'b');
ps_stkpsh(data, c, tmp);
}