kopia lustrzana https://github.com/Hamlib/Hamlib
Exposed constants via function calls
rodzic
cbe6698410
commit
15b3e73e7f
|
@ -24,6 +24,8 @@
|
||||||
#ifndef _RIG_H
|
#ifndef _RIG_H
|
||||||
#define _RIG_H 1
|
#define _RIG_H 1
|
||||||
|
|
||||||
|
#define LICENSE GPLV2
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ __BEGIN_DECLS
|
||||||
|
|
||||||
extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
|
extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
|
||||||
extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
|
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
|
* \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(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(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();
|
HAMLIB_EXPORT(void) rig_no_restore_ai();
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
22
src/rig.c
22
src/rig.c
|
@ -77,11 +77,18 @@
|
||||||
* the hamlib_version string. Changing the size provokes a warning from the
|
* the hamlib_version string. Changing the size provokes a warning from the
|
||||||
* dynamic loader.
|
* dynamic loader.
|
||||||
*/
|
*/
|
||||||
|
const char *hamlib_license = "GPLV2";
|
||||||
const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION;
|
const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION;
|
||||||
|
const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Hamlib copyright notice
|
* \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 */
|
const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */
|
||||||
"Copyright (C) 2000-2012 Stephane Fillod\n"
|
"Copyright (C) 2000-2012 Stephane Fillod\n"
|
||||||
"Copyright (C) 2000-2003 Frank Singleton\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);
|
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