the week-end party goes on \o\ /o/

finished transition to t_psdata format
corrected some pointer formating
started testing on parser function:
	- weird valgrind errors about uninitialised values
	- some read/write/free errors still hanging around

** END TRANSMISSION **
This commit is contained in:
Tanguy MAZE
2019-02-24 18:15:56 +01:00
parent beba6ce86f
commit 62764dc5e7
7 changed files with 78 additions and 49 deletions

View File

@@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/23 13:35:15 by tmaze #+# #+# */
/* Updated: 2019/02/23 14:55:14 by tmaze ### ########.fr */
/* Updated: 2019/02/24 15:38:10 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -38,7 +38,6 @@ int check_input(char *in, int *ret)
int i;
i = 0;
ret = 0;
while (in[i] && ft_iswhitespace(in[i]))
i++;
if (in[i] && ft_issign(in[i]))
@@ -62,16 +61,16 @@ int main(int ac, char **av)
t_psdata data;
i = ac;
while (i > 0)
nb = 0;
while (--i > 0)
{
if (check_input(av[i], &nb) && (new = ps_stknew(nb)) != NULL)
ps_stkpsh(&(data.a), new);
ps_stkpsh(&data, 'a', new);
else
{
ft_putendl_fd("Error", 2);
ps_stkclean(&data);
return (2);
}
i--;
}
}