kopia lustrzana https://github.com/Hamlib/Hamlib
Merge pull request #25 from mdblack98/master
Expose version and licensing via function callsHamlib-3.1
commit
234122bb50
|
@ -74,6 +74,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
|
||||
|
@ -1741,6 +1743,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
|
||||
|
|
22
src/rig.c
22
src/rig.c
|
@ -78,11 +78,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"
|
||||
|
@ -3341,4 +3348,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;
|
||||
}
|
||||
|
||||
/*! @} */
|
||||
|
|
Ładowanie…
Reference in New Issue