Exemple #1
0
int	handle_rotation(t_glob *glob, char *file, int *count)
{
  if (CMODIF_NEEDS)
    {
      printf(CMODIF_ERR, "<rotation>");
      free_and_quit(glob, file, count);
    }
  META_FLAG += IN_F_ROTATION;
  return (1);
}
Exemple #2
0
int	handle_pos(t_glob *glob, char *file, int *count)
{
  if (CMODIF_NEEDS)
    {
      printf(CMODIF_ERR, "<pos>");
      free_and_quit(glob, file, count);
    }
  META_FLAG += IN_F_POS;
  return (1);
}
Exemple #3
0
int	main(void)
{
	t_filler	f;
	char		*line;

	line = NULL;
	if (!my_first_init(&f, &line))
		return (free_and_quit(&f, &line));
	if (!my_compute(&f))
		return (free_and_quit(&f, &line));
	free_grid(&f.form);
	while (1)
	{
		if (!read_grid(&f.grid, &line))
			return (free_and_quit(&f, &line));
		if (!init_grid(&f.form, &line, PIECE))
			return (free_and_quit(&f, &line));
		if (!my_compute(&f))
			return (free_and_quit(&f, &line));
		free_grid(&f.form);
	}
	return (free_and_quit(&f, &line));
}