X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fyaz-version.h.in;h=7e7506f3834f79af8e77f68b3ea2ccaf270d8fac;hp=a56cc0a5fc2dcafcb0afb7995e2890ca40486318;hb=799ea46466fc7433ce75d7c66d796b5a0997f59c;hpb=6c24a7636cfb5c6609061e8f4bb696ad8f1607d1 diff --git a/include/yaz/yaz-version.h.in b/include/yaz/yaz-version.h.in index a56cc0a..7e7506f 100644 --- a/include/yaz/yaz-version.h.in +++ b/include/yaz/yaz-version.h.in @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data. + * Copyright (C) 1995-2009 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,25 +32,33 @@ #include +/** \brief YAZ version as string */ #define YAZ_VERSION "@VERSION@" -#define YAZ_VERSIONL 0x@YAZ_VERSION_HEX@ -#define YAZ_FILEVERSION @WIN_FILEVERSION@ - -#define YAZ_DATE 1 +/** \brief YAZ version as integer (for comparison purposes) */ +#define YAZ_VERSIONL 0x@VERSION_HEX@ +/** \brief YAZ file version for YAZ DLL (resource) */ +#define YAZ_FILEVERSION @WIN_FILEVERSION@ -#ifdef WIN32 -#ifdef NDEBUG -#define YAZ_OS "WIN32 Release" -#else -#define YAZ_OS "WIN32 Debug" -#endif -#endif +/** \brief SHA1 ID for YAZ (Git) */ +#define YAZ_VERSION_SHA1 "@VERSION_SHA1@" YAZ_BEGIN_CDECL -YAZ_EXPORT unsigned long yaz_version(char *version_str, char *sys_str); +/** \brief returns YAZ version + \param version_str holds version upon completion (YAZ_VERSION) + \param sha1_str holds SHA1 (Git) upon completion (YAZ_VERSION_SHA1) + \returns long version value (YAZ_VERSIONL) + + The version_str may be NULL in which case version is not returned. + When not-null, version_str, should point to a buffer of at least 20 + charcters in size (including "\0"). + The sha1_str may be NULL in which case the SHA1 is not returnd. + When not-null, sha1_str whould point to a buffer of at least 41 characters + in size (including "\0"). + */ +YAZ_EXPORT unsigned long yaz_version(char *version_str, char *sha1_str); YAZ_END_CDECL