Ejemplo n.º 1
0
void		read_archive(int fd, int v)
{
  t_file	f;
  char		*size;

  f.name = malloc(100);
  size = malloc(12);
  f.content = malloc(1);
  f.right = malloc(8);
  f.time = malloc(12);
  while (my_read(fd, &f.name, 100) > 0)
    {
      if (v)
	printf("%s, ", f.name);
      my_read(fd, &size, 12);
      f.size = gtnb(size);
      my_read(fd, &f.right, 8);
      my_read(fd, &f.time, 12);
      free(f.content);
      f.content = malloc(f.size);
      my_read(fd, &f.content, f.size);
      write_file(&f);
    }
  free_arch(&size, &f);
}
Ejemplo n.º 2
0
void vpr_free_vpr_data_structures(INOUTP t_arch Arch, INOUTP t_options options,
		INOUTP t_vpr_setup vpr_setup) {

	if (vpr_setup.Timing.SDCFile != NULL) {
		free(vpr_setup.Timing.SDCFile);
		vpr_setup.Timing.SDCFile = NULL;
	}

	free_options(&options);
	free_circuit();
	free_arch(&Arch);
	free_echo_file_info();
	free_output_file_names();
	free_timing_stats();
	free_sdc_related_structs();
}