# include "fits.h"

/*********************** fits copy header ***********************************/
int fits_copy_header (header1, header2) 
Header *header1, *header2;
{

  int i;

  header2[0].simple = header1[0].simple;
  header2[0].bitpix = header1[0].bitpix;
  header2[0].extend = header1[0].extend;
  header2[0].unsign = header1[0].unsign;
  header2[0].size   = header1[0].size;
  header2[0].bscale = header1[0].bscale;
  header2[0].bzero  = header1[0].bzero;
  header2[0].Naxes  = header1[0].Naxes;
  for (i = 0; i < FT_MAX_NAXES; i++) 
    header2[0].Naxis[i] = header1[0].Naxis[i];

  ALLOCATE (header2[0].buffer, char, header2[0].size);
  
  strncpy (header2[0].buffer, header1[0].buffer, header2[0].size);

  return (TRUE);
}	


