next up previous
Next: copy_format_attributes() Up: Brain Volume I/O Handling Previous: copy_header()

copy_volume()  

Copy an entire volume



Synopsis


void *
copy_volume( header *hdr, void *src )


Description
Allocates memory for a new volume, copies the volume data to the allocated memory and returns a pointer to the volume data.

Returns null if the memory cannot be allocated.

Usage

  header *hdr1, *hdr2;
  void *data1, data2;
  hdr1 = new_header();
  read_volume("myvolume.vol", hdr1, &data);
  hdr2 = copy_header(hdr1);
  data2 = copy_volume(hdr1, data);
  ..
  free_header(hdr1);
  free_header(hdr2);

Revision


1.0  29/10-96   Ulrik Kjems


Program listing






Ulrik Kjems
6/3/1998