0001 function status=copy_hdr_to_file(infname,outfname)
0002
0003
0004
0005
0006
0007 infid=fopen(infname);
0008 if infid == -1, error('Fuck up opening input file.');, end
0009
0010 [fhdr,chdr,ename,czeros,cgains,cnames,fcom,ftext]=rd_ses_hdr_v(infid);
0011
0012
0013 outfid=fopen(outfname,'w');
0014 if outfid == -1
0015 if infid ~= -1
0016 status=fclose(infid)
0017 end
0018 error('Fuck up opening output file.');
0019 end
0020
0021 status=wt_ses_hdr_v(outfid,fhdr,chdr,ename,czeros,cgains,cnames,fcom,ftext);
0022
0023 status=fclose('all');