Example #1
0
int		main(int ac, char **av)
{
	char		**tab;
	t_magic		magic;

	if (ac != 2)
		printf("You must enter an equation\n");
	else
	{
		magic = ft_ini_magic();
		tab = ft_strsplit(av[1], ' ');
		if (tab != NULL)
		{
			ft_parse_entry(tab, &magic);
			if (magic.error == 0)
			{
				ft_clear_list(&magic);
				printf("Reduced form: ");
				ft_display_reduced(&magic);
				ft_resolve(&magic);
			}
			else
				ft_error(&magic);
			ft_delete(&magic);
		}
	}
	return (0);
}
Example #2
0
File: main.c Project: tirrorex/C
int			main(int ac, char **av)
{
	t_data		*data;

	data = ft_parse_entry(ac, av);
	//ft_ls(data);
	if (data)
		ft_data_del(data);
	return (EXIT_SUCCESS);
}