Esempio n. 1
0
int		main(int ac, char **av)
{
  t_all		all;
  int		size;
  char		**tab;
  char		*file;

  if (ac > 1 && ac < 3)
    if ((file = read_it(av[1])) == NULL)
      return (put_error_int("THIS GAME SUCKS\n"));
  my_putstr(file);
  my_putstr("###################################################\n");
  if ((tab = my_str_to_wordtab(file, "\n")) == NULL)
    return (put_error_int("Error : STR_TO_WORDTAB failed\n"));
  if (init_value(&all, tab) == -1)
    return (put_error_int("Error : INIT_VALUE failed\n"));
}
Esempio n. 2
0
File: init.c Progetto: gedare/rtems
rtems_task Init(
  rtems_task_argument argument
)
{
  TEST_BEGIN();

  pppasyncattach();
  open_it();
  set_wakeups();
  set_discipline();
  write_it();
  ioctl_it();
  read_it();
  close_it();

  TEST_END();

  rtems_test_exit(0);
}
int		main(int ac, char **av)
{
  t_all		all;
  char		**tab;
  char		*file;

  if (ac == 2 || ac == 3)
    {
      if ((file = read_it(av[1])) == NULL)
	return (put_error_int("THIS GAME SUCKS\n"));
    }
  else
    return (put_error_int("RTFM ---> Usage : ./rt [XML]\n "));
  my_putstr(file);
  my_putstr("###################################################\n");
  if ((tab = my_str_to_wordtab(file, "\n")) == NULL)
    return (put_error_int("Error : STR_TO_WORDTAB failed\n"));
  if (init_value(&all, tab) == -1)
    return (put_error_int("Error : INIT_VALUE failed\n"));
  //all.my.k_color = 0;
  ///set_value(&all);
  init_raytracer(&all, av[2]);
  return (0);
}