#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>

#include "psMemory.h"
#include "psConfigure.h"
#include "psMetadata.h"

#include "psMetadataHeader.h"

bool psLibVersionHeader(psMetadata *header)
{
    PS_ASSERT_METADATA_NON_NULL(header, false);

    psString version = psLibVersion();  // Software version
    psString source = psLibSource();    // Software source

    psMetadataAddStr(header, PS_LIST_TAIL, "IPP.PSLIB.VERSION", PS_META_REPLACE,
                     "psLib software version", version);
    psMetadataAddStr(header, PS_LIST_TAIL, "IPP.PSLIB.SOURCE", PS_META_REPLACE,
                     "psLib software source", source);

    psFree(version);
    psFree(source);

    return true;
}
