diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 002f8109c..94284ffb5 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -24,6 +24,8 @@ #ifndef _RIG_H #define _RIG_H 1 +#define LICENSE GPLV2 + #include #include @@ -74,6 +76,8 @@ __BEGIN_DECLS extern HAMLIB_EXPORT_VAR(const char) hamlib_version[]; extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[]; +extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2; +extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2; /** * \brief Hamlib error codes @@ -1733,6 +1737,10 @@ extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s); extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s); extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s); +extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(()); +extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(()); +extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(()); + HAMLIB_EXPORT(void) rig_no_restore_ai(); __END_DECLS diff --git a/src/rig.c b/src/rig.c index b5ad89210..f47c1826f 100644 --- a/src/rig.c +++ b/src/rig.c @@ -77,11 +77,18 @@ * the hamlib_version string. Changing the size provokes a warning from the * dynamic loader. */ +const char *hamlib_license = "GPLV2"; const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION; +const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION; /** * \brief Hamlib copyright notice */ +const char *hamlib_copyright2 = + "Copyright (C) 2000-2012 Stephane Fillod\n" + "Copyright (C) 2000-2003 Frank Singleton\n" + "This is free software; see the source for copying conditions. There is NO\n" + "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."; const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ "Copyright (C) 2000-2012 Stephane Fillod\n" "Copyright (C) 2000-2003 Frank Singleton\n" @@ -3229,4 +3236,19 @@ const char* HAMLIB_API rig_get_info(RIG *rig) return rig->caps->get_info(rig); } +const char* HAMLIB_API rig_license() +{ + return hamlib_license; +} + +const char* HAMLIB_API rig_version() +{ + return hamlib_version2; +} + +const char* HAMLIB_API rig_copyright() +{ + return hamlib_copyright2; +} + /*! @} */