Logo Search packages:      
Sourcecode: qfits version File versions  Download package

qfits_header* qfits_header_copy ( const qfits_header src  ) 

Copy a FITS header.

src Header to replicate
Pointer to newly allocated qfits_header object.
Makes a strict copy of all information contained in the source header. The returned header must be freed using qfits_header_destroy.

Definition at line 523 of file qfits_header.c.

References first, qfits_header_append(), and qfits_header_new().

    qfits_header    *   fh_copy ;
    keytuple        *   k ;

    if (src==NULL) return NULL ;

    fh_copy = qfits_header_new();
    k = (keytuple*)src->first ;
    while (k!=NULL) {
        qfits_header_append(fh_copy, k->key, k->val, k->com, k->lin) ;
        k = k->next ;
    return fh_copy ;

Generated by  Doxygen 1.6.0   Back to index