// Functions that should go into psLib.


#ifndef PS_ADDITIONALS_H
#define PS_ADDITIONALS_H

#include "pslib.h"

// Deep copy of metadata
// Corrected version of MHPCC code in psLib at the moment
psMetadata *pap_psMetadataCopy(psMetadata *out, // Target, to which the copy is made
                               const psMetadata *in // Source, from which the copy is made
                              );

// copy a metadata item from one psMetadata to another
bool psMetadataItemTransfer (psMetadata *out, // Destination: copy is placed here
                             psMetadata *in,  // Source: item comes from here
                             char *key        // key to identify the metadata item
                            );


// Print out the metadata
void psMetadataPrint(psMetadata *md,    // Metadata to print
                     int level          // Indent level
                    );

// Split string on given characters
psList *psStringSplit(const char *string, // String to split
                      const char *splitters // Characters on which to split
                     );

// Split string on given characters
psArray *psStringSplitArray(const char *string, // String to split
                            const char *splitters // Characters on which to split
                           );

// strip whitespace from head and tail of string
int psStringStrip (char *string);

// write out header with NAXIS=0
bool psFitsWriteHeaderNotImage (psFits *fits, psMetadata *header);
#endif
