From 7f727979e1f69531b0fc78014e1fb3c0e3b5fc5b Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Thu, 24 Jan 2008 21:20:31 +0100 Subject: [PATCH] Add function to get library version. --- src/libisofs.h | 5 +++++ src/util.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/libisofs.h b/src/libisofs.h index 8b36dc6..6cab85b 100644 --- a/src/libisofs.h +++ b/src/libisofs.h @@ -745,6 +745,11 @@ void iso_finish(); */ int iso_image_new(const char *name, IsoImage **image); +/** + * Get version of the libisofs library. + */ +void iso_lib_version(int *major, int *minor, int *micro); + /** * Create a burn_source to actually write the image. That burn_source can be * used with libburn as a data source for a track. diff --git a/src/util.c b/src/util.c index e5384ba..d554978 100644 --- a/src/util.c +++ b/src/util.c @@ -9,6 +9,7 @@ #include "util.h" #include "error.h" +#include "../version.h" #include #include @@ -1172,3 +1173,10 @@ char *ucs2str(const char *buf, size_t len) out[len] = '\0'; return strdup(out); } + +void iso_lib_version(int *major, int *minor, int *micro) +{ + *major = LIBISOFS_MAJOR_VERSION; + *minor = LIBISOFS_MINOR_VERSION; + *micro = LIBISOFS_MICRO_VERSION; +}