From 74d82195191d0f7222ab64ca3479a579f16e6284 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 9 Nov 2021 20:21:31 -0300 Subject: [PATCH] Adding convenience method to get the product name set on ./configure. --- src/core/util.c | 4 ++++ src/include/lib3270/properties.h | 8 ++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/core/util.c b/src/core/util.c index 2ba337b..8ec4b9e 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -237,6 +237,10 @@ LIB3270_EXPORT const char * lib3270_get_revision(void) { return RPQ_REVISION; } +LIB3270_EXPORT const char * lib3270_get_product_name(void) { + return LIB3270_STRINGIZE_VALUE_OF(PRODUCT_NAME); +} + LIB3270_EXPORT char * lib3270_get_version_info(void) { #if defined(HAVE_LIBSSL) return lib3270_strdup_printf( diff --git a/src/include/lib3270/properties.h b/src/include/lib3270/properties.h index 55777a4..cfef186 100644 --- a/src/include/lib3270/properties.h +++ b/src/include/lib3270/properties.h @@ -253,6 +253,14 @@ LIB3270_EXPORT const LIB3270_UINT_PROPERTY * lib3270_unsigned_property_get_by_na LIB3270_EXPORT char * lib3270_get_version_info(void); /** + * @brief Get lib3270 product name. + * + * @return Internal string with the product name. + * + */ +LIB3270_EXPORT const char * lib3270_get_product_name(void); + +/** * @brief Get hostname for the connect/reconnect operations. * * @param h Session handle. -- libgit2 0.21.2