From 05033171c379123b2af6e29bd9f586f77d5fdcd3 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 21 Jan 2024 23:11:55 -0600 Subject: [PATCH] Change token_t to hamlib_token_t to avoid collsions with libbsm and others https://github.com/Hamlib/Hamlib/issues/1469 --- c++/ampclass.cc | 6 ++--- c++/rigclass.cc | 6 ++--- c++/rotclass.cc | 6 ++--- include/hamlib/ampclass.h | 6 ++--- include/hamlib/amplifier.h | 20 +++++++-------- include/hamlib/rig.h | 48 ++++++++++++++++++------------------ include/hamlib/rigclass.h | 6 ++--- include/hamlib/rotator.h | 42 +++++++++++++++---------------- include/hamlib/rotclass.h | 6 ++--- rigs/adat/adat.c | 4 +-- rigs/adat/adat.h | 4 +-- rigs/dummy/dummy.c | 16 ++++++------ rigs/dummy/dummy_common.c | 2 +- rigs/dummy/dummy_common.h | 2 +- rigs/dummy/flrig.c | 8 +++--- rigs/dummy/rot_dummy.c | 18 +++++++------- rigs/elad/elad.c | 4 +-- rigs/elad/elad.h | 4 +-- rigs/flexradio/dttsp.c | 10 ++++---- rigs/gomspace/gs100.c | 6 ++--- rigs/icmarine/icm710.c | 6 ++--- rigs/icmarine/icm710.h | 6 ++--- rigs/icmarine/icmarine.c | 6 ++--- rigs/icmarine/icmarine.h | 6 ++--- rigs/icom/ic746.c | 8 +++--- rigs/icom/ic756.c | 8 +++--- rigs/icom/icom.c | 22 ++++++++--------- rigs/icom/icom.h | 22 ++++++++--------- rigs/icom/optoscan.c | 4 +-- rigs/icom/optoscan.h | 4 +-- rigs/kenwood/k2.c | 4 +-- rigs/kenwood/k3.c | 8 +++--- rigs/kenwood/kenwood.c | 4 +-- rigs/kenwood/kenwood.h | 4 +-- rigs/kenwood/tmd710.c | 8 +++--- rigs/kenwood/ts2000.c | 8 +++--- rigs/kenwood/ts480.c | 8 +++--- rigs/kenwood/ts590.c | 8 +++--- rigs/kit/dds60.c | 10 ++++---- rigs/kit/drt1.c | 10 ++++---- rigs/kit/elektor304.c | 10 ++++---- rigs/kit/elektor507.c | 10 ++++---- rigs/kit/fifisdr.c | 4 +-- rigs/kit/hiqsdr.c | 10 ++++---- rigs/kit/si570avrusb.c | 10 ++++---- rigs/pcr/pcr.c | 2 +- rigs/pcr/pcr.h | 2 +- rigs/racal/ra37xx.c | 8 +++--- rigs/racal/ra37xx.h | 4 +-- rigs/racal/racal.c | 6 ++--- rigs/racal/racal.h | 4 +-- rigs/tentec/rx331.c | 10 ++++---- rigs/winradio/g313-posix.c | 4 +-- rigs/wj/wj.c | 6 ++--- rigs/wj/wj.h | 4 +-- rigs/yaesu/ft757gx.c | 10 ++++---- rigs/yaesu/newcat.c | 16 ++++++------ rigs/yaesu/newcat.h | 10 ++++---- rotators/easycomm/easycomm.c | 4 +-- rotators/flir/flir.c | 16 ++++++------ rotators/grbltrk/grbltrk.c | 2 +- rotators/rotorez/rotorez.c | 4 +-- rotators/spid/spid.c | 6 ++--- src/amp_conf.c | 14 +++++------ src/amp_conf.h | 4 +-- src/amplifier.c | 4 +-- src/conf.c | 14 +++++------ src/ext.c | 6 ++--- src/extamp.c | 4 +-- src/rot_conf.c | 16 ++++++------ src/rot_conf.h | 4 +-- src/rot_ext.c | 6 ++--- src/rot_settings.c | 12 ++++----- src/settings.c | 12 ++++----- tests/ampctl.c | 2 +- tests/ampctld.c | 2 +- tests/rigctl.c | 2 +- tests/rigctl_parse.c | 4 +-- tests/rigctld.c | 2 +- tests/rotctl.c | 2 +- tests/rotctl_parse.c | 4 +-- tests/rotctld.c | 2 +- 82 files changed, 333 insertions(+), 333 deletions(-) diff --git a/c++/ampclass.cc b/c++/ampclass.cc index de7519eb1..72509c6d7 100644 --- a/c++/ampclass.cc +++ b/c++/ampclass.cc @@ -65,7 +65,7 @@ void Amplifier::close(void) { CHECK_AMP( amp_close(theAmp) ); } -void Amplifier::setConf(token_t token, const char *val) +void Amplifier::setConf(hamlib_token_t token, const char *val) { CHECK_AMP( amp_set_conf(theAmp, token, val) ); } @@ -74,7 +74,7 @@ void Amplifier::setConf(const char *name, const char *val) CHECK_AMP( amp_set_conf(theAmp, tokenLookup(name), val) ); } -void Amplifier::getConf(token_t token, char *val) +void Amplifier::getConf(hamlib_token_t token, char *val) { CHECK_AMP( amp_get_conf(theAmp, token, val) ); } @@ -83,7 +83,7 @@ void Amplifier::getConf(const char *name, char *val) CHECK_AMP( amp_get_conf(theAmp, tokenLookup(name), val) ); } -token_t Amplifier::tokenLookup(const char *name) +hamlib_token_t Amplifier::tokenLookup(const char *name) { return amp_token_lookup(theAmp, name); } diff --git a/c++/rigclass.cc b/c++/rigclass.cc index 2cf951a49..218058ea0 100644 --- a/c++/rigclass.cc +++ b/c++/rigclass.cc @@ -76,7 +76,7 @@ void Rig::close(void) { CHECK_RIG( rig_close(theRig) ); } -void Rig::setConf(token_t token, const char *val) +void Rig::setConf(hamlib_token_t token, const char *val) { CHECK_RIG( rig_set_conf(theRig, token, val) ); } @@ -85,7 +85,7 @@ void Rig::setConf(const char *name, const char *val) CHECK_RIG( rig_set_conf(theRig, tokenLookup(name), val) ); } -void Rig::getConf(token_t token, char *val) +void Rig::getConf(hamlib_token_t token, char *val) { CHECK_RIG( rig_get_conf(theRig, token, val) ); } @@ -94,7 +94,7 @@ void Rig::getConf(const char *name, char *val) CHECK_RIG( rig_get_conf(theRig, tokenLookup(name), val) ); } -token_t Rig::tokenLookup(const char *name) +hamlib_token_t Rig::tokenLookup(const char *name) { return rig_token_lookup(theRig, name); } diff --git a/c++/rotclass.cc b/c++/rotclass.cc index 442776b44..daa47b711 100644 --- a/c++/rotclass.cc +++ b/c++/rotclass.cc @@ -64,7 +64,7 @@ void Rotator::close(void) { CHECK_ROT( rot_close(theRot) ); } -void Rotator::setConf(token_t token, const char *val) +void Rotator::setConf(hamlib_token_t token, const char *val) { CHECK_ROT( rot_set_conf(theRot, token, val) ); } @@ -73,7 +73,7 @@ void Rotator::setConf(const char *name, const char *val) CHECK_ROT( rot_set_conf(theRot, tokenLookup(name), val) ); } -void Rotator::getConf(token_t token, char *val) +void Rotator::getConf(hamlib_token_t token, char *val) { CHECK_ROT( rot_get_conf(theRot, token, val) ); } @@ -82,7 +82,7 @@ void Rotator::getConf(const char *name, char *val) CHECK_ROT( rot_get_conf(theRot, tokenLookup(name), val) ); } -token_t Rotator::tokenLookup(const char *name) +hamlib_token_t Rotator::tokenLookup(const char *name) { return rot_token_lookup(theRot, name); } diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h index 69a9617c9..1bb5876b7 100644 --- a/include/hamlib/ampclass.h +++ b/include/hamlib/ampclass.h @@ -53,11 +53,11 @@ public: // This method closes the communication port to the amp void close(void); - void setConf(token_t token, const char *val); + void setConf(hamlib_token_t token, const char *val); void setConf(const char *name, const char *val); - void getConf(token_t token, char *val); + void getConf(hamlib_token_t token, char *val); void getConf(const char *name, char *val); - token_t tokenLookup(const char *name); + hamlib_token_t tokenLookup(const char *name); void setFreq(freq_t freq); freq_t getFreq(); diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 9149ae814..3949e6e32 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -233,9 +233,9 @@ struct amp_caps int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */ int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */ - int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ - int (*get_conf2)(AMP *amp, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */ - int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ + int (*set_conf)(AMP *amp, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ + int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */ + int (*get_conf)(AMP *amp, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ /* * General API commands, from most primitive to least.. :() @@ -245,8 +245,8 @@ struct amp_caps int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */ int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */ int (*set_level)(AMP *amp, setting_t level, value_t val); /*!< Pointer to backend implementation of ::amp_get_level(). */ - int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ - int (*set_ext_level)(AMP *amp, token_t level, value_t val); /*!< Pointer to backend implementation of ::amp_set_ext_level(). */ + int (*get_ext_level)(AMP *amp, hamlib_token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ + int (*set_ext_level)(AMP *amp, hamlib_token_t level, value_t val); /*!< Pointer to backend implementation of ::amp_set_ext_level(). */ int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */ int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */ @@ -336,11 +336,11 @@ amp_cleanup HAMLIB_PARAMS((AMP *amp)); extern HAMLIB_EXPORT(int) amp_set_conf HAMLIB_PARAMS((AMP *amp, - token_t token, + hamlib_token_t token, const char *val)); extern HAMLIB_EXPORT(int) amp_get_conf HAMLIB_PARAMS((AMP *amp, - token_t token, + hamlib_token_t token, char *val)); extern HAMLIB_EXPORT(int) amp_set_powerstat HAMLIB_PARAMS((AMP *amp, @@ -408,7 +408,7 @@ extern HAMLIB_EXPORT(const struct confparams *) amp_confparam_lookup HAMLIB_PARAMS((AMP *amp, const char *name)); -extern HAMLIB_EXPORT(token_t) +extern HAMLIB_EXPORT(hamlib_token_t) amp_token_lookup HAMLIB_PARAMS((AMP *amp, const char *name)); @@ -429,12 +429,12 @@ amp_ext_lookup HAMLIB_PARAMS((AMP *amp, extern HAMLIB_EXPORT(int) amp_get_ext_level HAMLIB_PARAMS((AMP *amp, - token_t token, + hamlib_token_t token, value_t *val)); extern HAMLIB_EXPORT(int) amp_set_ext_level HAMLIB_PARAMS((AMP *amp, - token_t token, + hamlib_token_t token, value_t val)); extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 3686b662a..40cbb2285 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -842,7 +842,7 @@ typedef enum { /** * \brief configuration token */ -typedef long token_t; +typedef long hamlib_token_t; //! @cond Doxygen_Suppress @@ -883,7 +883,7 @@ enum rig_conf_e { * \brief Configuration parameter structure. */ struct confparams { - token_t token; /*!< Conf param token ID */ + hamlib_token_t token; /*!< Conf param token ID */ const char *name; /*!< Param name, no spaces allowed */ const char *label; /*!< Human readable label */ const char *tooltip; /*!< Hint on the parameter */ @@ -1536,7 +1536,7 @@ struct filter_list { * */ struct ext_list { - token_t token; /*!< Token ID */ + hamlib_token_t token; /*!< Token ID */ value_t val; /*!< Value */ }; @@ -2081,17 +2081,17 @@ struct rig_caps { int (*set_parm)(RIG *rig, setting_t parm, value_t val); int (*get_parm)(RIG *rig, setting_t parm, value_t *val); - int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val); - int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val); + int (*set_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); + int (*get_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); - int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status); - int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status); + int (*set_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int status); + int (*get_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status); - int (*set_ext_parm)(RIG *rig, token_t token, value_t val); - int (*get_ext_parm)(RIG *rig, token_t token, value_t *val); + int (*set_ext_parm)(RIG *rig, hamlib_token_t token, value_t val); + int (*get_ext_parm)(RIG *rig, hamlib_token_t token, value_t *val); - int (*set_conf)(RIG *rig, token_t token, const char *val); - int (*get_conf)(RIG *rig, token_t token, char *val); + int (*set_conf)(RIG *rig, hamlib_token_t token, const char *val); + int (*get_conf)(RIG *rig, hamlib_token_t token, char *val); int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits); int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length); @@ -2162,7 +2162,7 @@ struct rig_caps { const unsigned char *frame); // this will be used to check rigcaps structure is compatible with client char *hamlib_check_rig_caps; // a constant value we can check for hamlib integrity - int (*get_conf2)(RIG *rig, token_t token, char *val, int val_len); + int (*get_conf2)(RIG *rig, hamlib_token_t token, char *val, int val_len); int (*password)(RIG *rig, const char *key1); /*< Send encrypted password if rigctld is secured with -A/--password */ int (*set_lock_mode)(RIG *rig, int mode); int (*get_lock_mode)(RIG *rig, int *mode); @@ -3321,16 +3321,16 @@ rig_get_parm HAMLIB_PARAMS((RIG *rig, extern HAMLIB_EXPORT(int) rig_set_conf HAMLIB_PARAMS((RIG *rig, - token_t token, + hamlib_token_t token, const char *val)); // deprecating rig_get_conf extern HAMLIB_EXPORT(int) rig_get_conf HAMLIB_PARAMS((RIG *rig, - token_t token, + hamlib_token_t token, char *val)); extern HAMLIB_EXPORT(int) rig_get_conf2 HAMLIB_PARAMS((RIG *rig, - token_t token, + hamlib_token_t token, char *val, int val_len)); @@ -3348,32 +3348,32 @@ rig_reset HAMLIB_PARAMS((RIG *rig, extern HAMLIB_EXPORT(int) rig_set_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, value_t val)); extern HAMLIB_EXPORT(int) rig_get_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, value_t *val)); extern HAMLIB_EXPORT(int) rig_set_ext_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, int status)); extern HAMLIB_EXPORT(int) rig_get_ext_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, int *status)); extern HAMLIB_EXPORT(int) rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, - token_t token, + hamlib_token_t token, value_t val)); extern HAMLIB_EXPORT(int) rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, - token_t token, + hamlib_token_t token, value_t *val)); extern HAMLIB_EXPORT(int) @@ -3401,8 +3401,8 @@ rig_ext_lookup HAMLIB_PARAMS((RIG *rig, extern HAMLIB_EXPORT(const struct confparams *) rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, - token_t token)); -extern HAMLIB_EXPORT(token_t) + hamlib_token_t token)); +extern HAMLIB_EXPORT(hamlib_token_t) rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name)); @@ -3416,7 +3416,7 @@ rig_token_foreach HAMLIB_PARAMS((RIG *rig, extern HAMLIB_EXPORT(const struct confparams *) rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const char *name)); -extern HAMLIB_EXPORT(token_t) +extern HAMLIB_EXPORT(hamlib_token_t) rig_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name)); diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h index e65f839ea..23b4738fd 100644 --- a/include/hamlib/rigclass.h +++ b/include/hamlib/rigclass.h @@ -54,11 +54,11 @@ public: // This method closes the communication port to the rig void close(void); - void setConf(token_t token, const char *val); + void setConf(hamlib_token_t token, const char *val); void setConf(const char *name, const char *val); - void getConf(token_t token, char *val); + void getConf(hamlib_token_t token, char *val); void getConf(const char *name, char *val); - token_t tokenLookup(const char *name); + hamlib_token_t tokenLookup(const char *name); void setFreq(freq_t freq, vfo_t vfo = RIG_VFO_CURR); freq_t getFreq(vfo_t vfo = RIG_VFO_CURR); diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index 3b2947eef..6427001c3 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -414,8 +414,8 @@ struct rot_caps { int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */ int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */ - int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ - int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ + int (*set_conf)(ROT *rot, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ + int (*get_conf)(ROT *rot, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ /* * General API commands, from most primitive to least.. :() @@ -442,19 +442,19 @@ struct rot_caps { int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */ int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */ - int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ - int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ + int (*set_ext_level)(ROT *rot, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ + int (*get_ext_level)(ROT *rot, hamlib_token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ - int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ - int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ + int (*set_ext_func)(ROT *rot, hamlib_token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ + int (*get_ext_func)(ROT *rot, hamlib_token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ - int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ - int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ + int (*set_ext_parm)(ROT *rot, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ + int (*get_ext_parm)(ROT *rot, hamlib_token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */ const char *macro_name; /*!< Rotator model macro name. */ - int (*get_conf2)(ROT *rot, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::rot_get_conf2(). */ + int (*get_conf2)(ROT *rot, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::rot_get_conf2(). */ }; //! @cond Doxygen_Suppress #define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg @@ -545,16 +545,16 @@ rot_cleanup HAMLIB_PARAMS((ROT *rot)); extern HAMLIB_EXPORT(int) rot_set_conf HAMLIB_PARAMS((ROT *rot, - token_t token, + hamlib_token_t token, const char *val)); extern HAMLIB_EXPORT(int) rot_get_conf HAMLIB_PARAMS((ROT *rot, - token_t token, + hamlib_token_t token, char *val)); extern HAMLIB_EXPORT(int) rot_get_conf2 HAMLIB_PARAMS((ROT *rot, - token_t token, + hamlib_token_t token, char *val, int val_len)); @@ -636,29 +636,29 @@ rot_get_parm HAMLIB_PARAMS((ROT *rig, extern HAMLIB_EXPORT(int) rot_set_ext_level HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, value_t val)); extern HAMLIB_EXPORT(int) rot_get_ext_level HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, value_t *val)); extern HAMLIB_EXPORT(int) rot_set_ext_func HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, int status)); extern HAMLIB_EXPORT(int) rot_get_ext_func HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, int *status)); extern HAMLIB_EXPORT(int) rot_set_ext_parm HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, value_t val)); extern HAMLIB_EXPORT(int) rot_get_ext_parm HAMLIB_PARAMS((ROT *rig, - token_t token, + hamlib_token_t token, value_t *val)); extern HAMLIB_EXPORT(const char *) @@ -701,7 +701,7 @@ extern HAMLIB_EXPORT(const struct confparams *) rot_confparam_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); -extern HAMLIB_EXPORT(token_t) +extern HAMLIB_EXPORT(hamlib_token_t) rot_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); @@ -730,8 +730,8 @@ rot_ext_lookup HAMLIB_PARAMS((ROT *rot, extern HAMLIB_EXPORT(const struct confparams *) rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot, - token_t token)); -extern HAMLIB_EXPORT(token_t) + hamlib_token_t token)); +extern HAMLIB_EXPORT(hamlib_token_t) rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot, const char *name)); diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h index 1ee8206b7..219e3a92f 100644 --- a/include/hamlib/rotclass.h +++ b/include/hamlib/rotclass.h @@ -51,11 +51,11 @@ public: // This method closes the communication port to the rot void close(void); - void setConf(token_t token, const char *val); + void setConf(hamlib_token_t token, const char *val); void setConf(const char *name, const char *val); - void getConf(token_t token, char *val); + void getConf(hamlib_token_t token, char *val); void getConf(const char *name, char *val); - token_t tokenLookup(const char *name); + hamlib_token_t tokenLookup(const char *name); void setPosition(azimuth_t az, elevation_t el); void getPosition(azimuth_t& az, elevation_t& el); diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index 8a5cfd583..025aa40c4 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -3254,7 +3254,7 @@ int adat_get_powerstat(RIG *pRig, powerstat_t *status) // Function adat_set_conf // --------------------------------------------------------------------------- // Status: IN WORK -int adat_set_conf(RIG *pRig, token_t token, const char *val) +int adat_set_conf(RIG *pRig, hamlib_token_t token, const char *val) { int nRC = RIG_OK; @@ -3300,7 +3300,7 @@ int adat_set_conf(RIG *pRig, token_t token, const char *val) // Function adat_get_conf // --------------------------------------------------------------------------- // Status: IN WORK -int adat_get_conf(RIG *pRig, token_t token, char *val) +int adat_get_conf(RIG *pRig, hamlib_token_t token, char *val) { int nRC = RIG_OK; diff --git a/rigs/adat/adat.h b/rigs/adat/adat.h index 8a69f5848..35c8b73e1 100644 --- a/rigs/adat/adat.h +++ b/rigs/adat/adat.h @@ -580,8 +580,8 @@ int adat_reset(RIG *, reset_t); int adat_open(RIG *); int adat_close(RIG *); -int adat_set_conf(RIG *, token_t, const char *val); -int adat_get_conf(RIG *, token_t, char *val); +int adat_set_conf(RIG *, hamlib_token_t, const char *val); +int adat_get_conf(RIG *, hamlib_token_t, char *val); int adat_set_freq(RIG *, vfo_t, freq_t); int adat_get_freq(RIG *, vfo_t, freq_t *); diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 7180f37ff..50e93cec8 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -375,7 +375,7 @@ static int dummy_close(RIG *rig) RETURNFUNC(RIG_OK); } -static int dummy_set_conf(RIG *rig, token_t token, const char *val) +static int dummy_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct dummy_priv_data *priv; @@ -404,7 +404,7 @@ static int dummy_set_conf(RIG *rig, token_t token, const char *val) RETURNFUNC(RIG_OK); } -static int dummy_get_conf(RIG *rig, token_t token, char *val) +static int dummy_get_conf(RIG *rig, hamlib_token_t token, char *val) { struct dummy_priv_data *priv; @@ -1374,7 +1374,7 @@ static int dummy_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) RETURNFUNC(RIG_OK); } -static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +static int dummy_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; @@ -1444,7 +1444,7 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) RETURNFUNC(RIG_OK); } -static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +static int dummy_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; @@ -1488,7 +1488,7 @@ static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) } -static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) +static int dummy_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; const struct confparams *cfp; @@ -1540,7 +1540,7 @@ static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) } -static int dummy_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) +static int dummy_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; const struct confparams *cfp; @@ -1658,7 +1658,7 @@ static int dummy_get_parm(RIG *rig, setting_t parm, value_t *val) RETURNFUNC(RIG_OK); } -static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) +static int dummy_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; char lstr[64]; @@ -1725,7 +1725,7 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) RETURNFUNC(RIG_OK); } -static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val) +static int dummy_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; const struct confparams *cfp; diff --git a/rigs/dummy/dummy_common.c b/rigs/dummy/dummy_common.c index 58779d055..b064b46d8 100644 --- a/rigs/dummy/dummy_common.c +++ b/rigs/dummy/dummy_common.c @@ -56,7 +56,7 @@ struct ext_list *alloc_init_ext(const struct confparams *cfp) return elp; } -struct ext_list *find_ext(struct ext_list *elp, token_t token) +struct ext_list *find_ext(struct ext_list *elp, hamlib_token_t token) { int i; diff --git a/rigs/dummy/dummy_common.h b/rigs/dummy/dummy_common.h index eba065383..919a12b4a 100644 --- a/rigs/dummy/dummy_common.h +++ b/rigs/dummy/dummy_common.h @@ -25,6 +25,6 @@ #include "hamlib/rig.h" struct ext_list *alloc_init_ext(const struct confparams *cfp); -struct ext_list *find_ext(struct ext_list *elp, token_t token); +struct ext_list *find_ext(struct ext_list *elp, hamlib_token_t token); #endif /* _DUMMY_H */ diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index c7f6b3739..e9d1ec9a3 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -87,8 +87,8 @@ static int flrig_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -static int flrig_set_ext_parm(RIG *rig, token_t token, value_t val); -static int flrig_get_ext_parm(RIG *rig, token_t token, value_t *val); +static int flrig_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +static int flrig_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); static const char *flrig_get_info(RIG *rig); static int flrig_power2mW(RIG *rig, unsigned int *mwpower, float power, @@ -2397,7 +2397,7 @@ static int flrig_mW2power(RIG *rig, float *power, unsigned int mwpower, } -static int flrig_set_ext_parm(RIG *rig, token_t token, value_t val) +static int flrig_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { struct flrig_priv_data *priv = (struct flrig_priv_data *)rig->state.priv; char lstr[64]; @@ -2474,7 +2474,7 @@ static int flrig_set_ext_parm(RIG *rig, token_t token, value_t val) RETURNFUNC(RIG_OK); } -static int flrig_get_ext_parm(RIG *rig, token_t token, value_t *val) +static int flrig_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { struct flrig_priv_data *priv = (struct flrig_priv_data *)rig->state.priv; const struct confparams *cfp; diff --git a/rigs/dummy/rot_dummy.c b/rigs/dummy/rot_dummy.c index 11fc36b52..e8843230a 100644 --- a/rigs/dummy/rot_dummy.c +++ b/rigs/dummy/rot_dummy.c @@ -201,7 +201,7 @@ static int dummy_rot_close(ROT *rot) return RIG_OK; } -static int dummy_set_conf(ROT *rot, token_t token, const char *val) +static int dummy_set_conf(ROT *rot, hamlib_token_t token, const char *val) { struct dummy_rot_priv_data *priv; @@ -226,7 +226,7 @@ static int dummy_set_conf(ROT *rot, token_t token, const char *val) } -static int dummy_get_conf2(ROT *rot, token_t token, char *val, int val_len) +static int dummy_get_conf2(ROT *rot, hamlib_token_t token, char *val, int val_len) { struct dummy_rot_priv_data *priv; @@ -245,7 +245,7 @@ static int dummy_get_conf2(ROT *rot, token_t token, char *val, int val_len) return RIG_OK; } -static int dummy_get_conf(ROT *rot, token_t token, char *val) +static int dummy_get_conf(ROT *rot, hamlib_token_t token, char *val) { return dummy_get_conf2(rot, token, val, 128); } @@ -538,7 +538,7 @@ static int dummy_get_level(ROT *rot, setting_t level, value_t *val) return RIG_OK; } -static int dummy_set_ext_level(ROT *rot, token_t token, value_t val) +static int dummy_set_ext_level(ROT *rot, hamlib_token_t token, value_t val) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; @@ -607,7 +607,7 @@ static int dummy_set_ext_level(ROT *rot, token_t token, value_t val) return RIG_OK; } -static int dummy_get_ext_level(ROT *rot, token_t token, value_t *val) +static int dummy_get_ext_level(ROT *rot, hamlib_token_t token, value_t *val) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; @@ -650,7 +650,7 @@ static int dummy_get_ext_level(ROT *rot, token_t token, value_t *val) } -static int dummy_set_ext_func(ROT *rot, token_t token, int status) +static int dummy_set_ext_func(ROT *rot, hamlib_token_t token, int status) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; @@ -702,7 +702,7 @@ static int dummy_set_ext_func(ROT *rot, token_t token, int status) } -static int dummy_get_ext_func(ROT *rot, token_t token, int *status) +static int dummy_get_ext_func(ROT *rot, hamlib_token_t token, int *status) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; @@ -795,7 +795,7 @@ static int dummy_get_parm(ROT *rot, setting_t parm, value_t *val) return RIG_OK; } -static int dummy_set_ext_parm(ROT *rot, token_t token, value_t val) +static int dummy_set_ext_parm(ROT *rot, hamlib_token_t token, value_t val) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; @@ -861,7 +861,7 @@ static int dummy_set_ext_parm(ROT *rot, token_t token, value_t val) return RIG_OK; } -static int dummy_get_ext_parm(ROT *rot, token_t token, value_t *val) +static int dummy_get_ext_parm(ROT *rot, hamlib_token_t token, value_t *val) { struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *) rot->state.priv; diff --git a/rigs/elad/elad.c b/rigs/elad/elad.c index 3c63c3cb7..299e98741 100644 --- a/rigs/elad/elad.c +++ b/rigs/elad/elad.c @@ -3583,7 +3583,7 @@ int elad_set_channel(RIG *rig, const channel_t *chan) return elad_transaction(rig, buf, NULL, 0); } -int elad_set_ext_parm(RIG *rig, token_t token, value_t val) +int elad_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { char buf[4]; @@ -3610,7 +3610,7 @@ int elad_set_ext_parm(RIG *rig, token_t token, value_t val) return -RIG_EINVAL; } -int elad_get_ext_parm(RIG *rig, token_t token, value_t *val) +int elad_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { int err; struct elad_priv_data *priv = rig->state.priv; diff --git a/rigs/elad/elad.h b/rigs/elad/elad.h index aa689cc5d..423ffb93a 100644 --- a/rigs/elad/elad.h +++ b/rigs/elad/elad.h @@ -129,8 +129,8 @@ int elad_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int elad_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int elad_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int elad_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); -int elad_set_ext_parm(RIG *rig, token_t token, value_t val); -int elad_get_ext_parm(RIG *rig, token_t token, value_t *val); +int elad_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +int elad_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); int elad_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone); int elad_set_ctcss_tone_tn(RIG *rig, vfo_t vfo, tone_t tone); int elad_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); diff --git a/rigs/flexradio/dttsp.c b/rigs/flexradio/dttsp.c index 748e43a18..f2a576fea 100644 --- a/rigs/flexradio/dttsp.c +++ b/rigs/flexradio/dttsp.c @@ -81,8 +81,8 @@ static int dttsp_set_freq(RIG *rig, vfo_t vfo, freq_t freq); static int dttsp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); static int dttsp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); -static int dttsp_set_conf(RIG *rig, token_t token, const char *val); -static int dttsp_get_conf(RIG *rig, token_t token, char *val); +static int dttsp_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int dttsp_get_conf(RIG *rig, hamlib_token_t token, char *val); static int dttsp_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); static int dttsp_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); static int dttsp_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); @@ -400,7 +400,7 @@ static int fetch_meter(RIG *rig, int *label, float *data, int npts) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int dttsp_set_conf(RIG *rig, token_t token, const char *val) +int dttsp_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct dttsp_priv_data *priv; struct rig_state *rs; @@ -439,7 +439,7 @@ int dttsp_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int dttsp_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int dttsp_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct dttsp_priv_data *priv; struct rig_state *rs; @@ -473,7 +473,7 @@ int dttsp_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int dttsp_get_conf(RIG *rig, token_t token, char *val) +int dttsp_get_conf(RIG *rig, hamlib_token_t token, char *val) { return dttsp_get_conf2(rig, token, val, 128); } diff --git a/rigs/gomspace/gs100.c b/rigs/gomspace/gs100.c index 61ca63893..ce8115024 100644 --- a/rigs/gomspace/gs100.c +++ b/rigs/gomspace/gs100.c @@ -71,7 +71,7 @@ struct gs100_priv_data /* Imported Functions --------------------------------------------------------*/ struct ext_list *alloc_init_ext(const struct confparams *cfp); -struct ext_list *find_ext(struct ext_list *elp, token_t token); +struct ext_list *find_ext(struct ext_list *elp, hamlib_token_t token); /* Private function prototypes -----------------------------------------------*/ @@ -166,7 +166,7 @@ static int gs100_close(RIG *rig) /* GS100 transceiver set configuration */ -static int gs100_set_conf(RIG *rig, token_t token, const char *val) +static int gs100_set_conf(RIG *rig, hamlib_token_t token, const char *val) { __attribute__((unused)) struct gs100_priv_data *priv = (struct gs100_priv_data *)rig->state.priv; @@ -192,7 +192,7 @@ static int gs100_set_conf(RIG *rig, token_t token, const char *val) /* GS100 transceiver get configuration */ -static int gs100_get_conf(RIG *rig, token_t token, char *val) +static int gs100_get_conf(RIG *rig, hamlib_token_t token, char *val) { __attribute__((unused)) struct gs100_priv_data *priv = (struct gs100_priv_data *)rig->state.priv; diff --git a/rigs/icmarine/icm710.c b/rigs/icmarine/icm710.c index 88587c71f..25eb33a50 100644 --- a/rigs/icmarine/icm710.c +++ b/rigs/icmarine/icm710.c @@ -327,7 +327,7 @@ int icm710_cleanup(RIG *rig) return RIG_OK; } -int icm710_set_conf(RIG *rig, token_t token, const char *val) +int icm710_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct icm710_priv_data *priv; @@ -346,7 +346,7 @@ int icm710_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int icm710_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int icm710_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct icm710_priv_data *priv; @@ -365,7 +365,7 @@ int icm710_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int icm710_get_conf(RIG *rig, token_t token, char *val) +int icm710_get_conf(RIG *rig, hamlib_token_t token, char *val) { return icm710_get_conf2(rig, token, val, 128); } diff --git a/rigs/icmarine/icm710.h b/rigs/icmarine/icm710.h index 73efd3ffb..6da52c16e 100644 --- a/rigs/icmarine/icm710.h +++ b/rigs/icmarine/icm710.h @@ -71,9 +71,9 @@ int icm710_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int icm710_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); int icm710_set_parm(RIG *rig, setting_t parm, value_t val); int icm710_get_parm(RIG *rig, setting_t parm, value_t *val); -int icm710_set_conf(RIG *rig, token_t token, const char *val); -int icm710_get_conf(RIG *rig, token_t token, char *val); -int icm710_get_conf2(RIG *rig, token_t token, char *val, int val_len); +int icm710_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int icm710_get_conf(RIG *rig, hamlib_token_t token, char *val); +int icm710_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len); extern struct rig_caps icm700pro_caps; extern struct rig_caps icm710_caps; diff --git a/rigs/icmarine/icmarine.c b/rigs/icmarine/icmarine.c index 5cc804336..d05d8c6a3 100644 --- a/rigs/icmarine/icmarine.c +++ b/rigs/icmarine/icmarine.c @@ -183,7 +183,7 @@ int icmarine_open(RIG *rig) #endif -int icmarine_set_conf(RIG *rig, token_t token, const char *val) +int icmarine_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct icmarine_priv_data *priv; @@ -202,7 +202,7 @@ int icmarine_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int icmarine_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int icmarine_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct icmarine_priv_data *priv; @@ -221,7 +221,7 @@ int icmarine_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int icmarine_get_conf(RIG *rig, token_t token, char *val) +int icmarine_get_conf(RIG *rig, hamlib_token_t token, char *val) { return icmarine_get_conf2(rig, token, val, 128); } diff --git a/rigs/icmarine/icmarine.h b/rigs/icmarine/icmarine.h index a1c0415e0..a9c084db7 100644 --- a/rigs/icmarine/icmarine.h +++ b/rigs/icmarine/icmarine.h @@ -61,9 +61,9 @@ int icmarine_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int icmarine_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); int icmarine_set_parm(RIG *rig, setting_t parm, value_t val); int icmarine_get_parm(RIG *rig, setting_t parm, value_t *val); -int icmarine_set_conf(RIG *rig, token_t token, const char *val); -int icmarine_get_conf(RIG *rig, token_t token, char *val); -int icmarine_get_conf2(RIG *rig, token_t token, char *val, int val_len); +int icmarine_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int icmarine_get_conf(RIG *rig, hamlib_token_t token, char *val); +int icmarine_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len); extern struct rig_caps icm700pro_caps; extern struct rig_caps icm710_caps; diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index 37b82b934..616b8f08c 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -151,8 +151,8 @@ static int ic746_get_parm(RIG *rig, setting_t parm, value_t *val); static int ic746pro_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only); static int ic746pro_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan); -static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val); -static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val); +static int ic746pro_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +static int ic746pro_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); /* @@ -603,7 +603,7 @@ struct rig_caps ic746pro_caps = /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val) +static int ic746pro_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN]; int ack_len, ep_len, val_len; @@ -667,7 +667,7 @@ static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val) +static int ic746pro_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { const struct confparams *cfp; diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index 9e7a57bd0..67b63f506 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -528,8 +528,8 @@ static const struct confparams ic756pro2_ext_parms[] = #define S_MEM_RTTY_TWNPK 0x562 /* rtty twin peak filter off/on */ -static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val); -static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val); +static int ic756pro2_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +static int ic756pro2_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); #define IC756PROII_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM) #define IC756PROII_1HZ_TS_MODES IC756PROII_ALL_RX_MODES @@ -699,7 +699,7 @@ struct rig_caps ic756pro2_caps = /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val) +static int ic756pro2_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN]; int ack_len, ep_len, val_len; @@ -780,7 +780,7 @@ static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val) +static int ic756pro2_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { const struct confparams *cfp; diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 9b701adf2..28d923b0a 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -4460,7 +4460,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) RETURNFUNC(RIG_OK); } -int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +int icom_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { const struct confparams *cfp = rig->caps->extlevels; unsigned char cmdbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN]; @@ -4600,7 +4600,7 @@ int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) RETURNFUNC2(RIG_OK); } -int icom_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int icom_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { const struct confparams *cfp = rig->caps->extlevels; unsigned char cmdbuf[MAXFRAMELEN], respbuf[MAXFRAMELEN]; @@ -4720,7 +4720,7 @@ int icom_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) RETURNFUNC(RIG_OK); } -int icom_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) +int icom_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status) { ENTERFUNC; @@ -4746,7 +4746,7 @@ int icom_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) RETURNFUNC(-RIG_EINVAL); } -int icom_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) +int icom_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status) { ENTERFUNC; @@ -4779,7 +4779,7 @@ int icom_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) RETURNFUNC(-RIG_EINVAL); } -int icom_set_ext_parm(RIG *rig, token_t token, value_t val) +int icom_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { ENTERFUNC; @@ -4804,7 +4804,7 @@ int icom_set_ext_parm(RIG *rig, token_t token, value_t val) RETURNFUNC(-RIG_EINVAL); } -int icom_get_ext_parm(RIG *rig, token_t token, value_t *val) +int icom_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { ENTERFUNC; @@ -4829,7 +4829,7 @@ int icom_get_ext_parm(RIG *rig, token_t token, value_t *val) RETURNFUNC(-RIG_EINVAL); } -int icom_get_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int icom_get_ext_cmd(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int i; @@ -4864,7 +4864,7 @@ int icom_get_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t *val) RETURNFUNC(-RIG_EINVAL); } -int icom_set_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t val) +int icom_set_ext_cmd(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { int i; @@ -4902,7 +4902,7 @@ int icom_set_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t val) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int icom_set_conf(RIG *rig, token_t token, const char *val) +int icom_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct icom_priv_data *priv; struct rig_state *rs; @@ -4945,7 +4945,7 @@ int icom_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int icom_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int icom_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct icom_priv_data *priv; struct rig_state *rs; @@ -4972,7 +4972,7 @@ int icom_get_conf2(RIG *rig, token_t token, char *val, int val_len) RETURNFUNC(RIG_OK); } -int icom_get_conf(RIG *rig, token_t token, char *val) +int icom_get_conf(RIG *rig, hamlib_token_t token, char *val) { return icom_get_conf2(rig, token, val, 128); } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 754b31666..cd7ec0f9d 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -139,7 +139,7 @@ struct cmdparams union { setting_t s; /*!< Level or parm */ - token_t t; /*!< TOKEN_BACKEND */ + hamlib_token_t t; /*!< TOKEN_BACKEND */ } id; cmd_param_t cmdparamtype; /*!< CMD_PARAM_TYPE_LEVEL or CMD_PARAM_TYPE_PARM */ int command; /*!< CI-V command */ @@ -368,20 +368,20 @@ int icom_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch); int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val); -int icom_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val); +int icom_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); +int icom_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); -int icom_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status); -int icom_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status); +int icom_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status); +int icom_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status); int icom_set_parm(RIG *rig, setting_t parm, value_t val); int icom_get_parm(RIG *rig, setting_t parm, value_t *val); -int icom_set_ext_parm(RIG *rig, token_t token, value_t val); -int icom_get_ext_parm(RIG *rig, token_t token, value_t *val); -int icom_set_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t val); -int icom_get_ext_cmd(RIG *rig, vfo_t vfo, token_t token, value_t *val); -int icom_set_conf(RIG *rig, token_t token, const char *val); -int icom_get_conf(RIG *rig, token_t token, char *val); +int icom_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +int icom_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); +int icom_set_ext_cmd(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); +int icom_get_ext_cmd(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); +int icom_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int icom_get_conf(RIG *rig, hamlib_token_t token, char *val); int icom_set_powerstat(RIG *rig, powerstat_t status); int icom_get_powerstat(RIG *rig, powerstat_t *status); int icom_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option); diff --git a/rigs/icom/optoscan.c b/rigs/icom/optoscan.c index aefb28f7d..70e8372e0 100644 --- a/rigs/icom/optoscan.c +++ b/rigs/icom/optoscan.c @@ -294,7 +294,7 @@ int optoscan_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int optoscan_set_ext_parm(RIG *rig, token_t token, value_t val) +int optoscan_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN]; int ack_len; @@ -367,7 +367,7 @@ int optoscan_set_ext_parm(RIG *rig, token_t token, value_t val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int optoscan_get_ext_parm(RIG *rig, token_t token, value_t *val) +int optoscan_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { struct optostat status_block; int retval; diff --git a/rigs/icom/optoscan.h b/rigs/icom/optoscan.h index 6cfb5f4d1..c993e7ef8 100644 --- a/rigs/icom/optoscan.h +++ b/rigs/icom/optoscan.h @@ -43,8 +43,8 @@ const char* optoscan_get_info(RIG *rig); int optoscan_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); int optoscan_get_dcs_code(RIG * rig, vfo_t vfo, tone_t *code); int optoscan_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length); -int optoscan_set_ext_parm(RIG *rig, token_t token, value_t val); -int optoscan_get_ext_parm(RIG *rig, token_t token, value_t *val); +int optoscan_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +int optoscan_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); int optoscan_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int optoscan_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int optoscan_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch); diff --git a/rigs/kenwood/k2.c b/rigs/kenwood/k2.c index bbc5a8ec2..0af922307 100644 --- a/rigs/kenwood/k2.c +++ b/rigs/kenwood/k2.c @@ -98,7 +98,7 @@ struct k2_filt_lst_s k2_fwmd_rtty; int k2_open(RIG *rig); int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); -int k2_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val); +int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); /* Private function declarations */ int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv); @@ -489,7 +489,7 @@ int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) * STRING: val.cs for set, val.s for get * CHECKBUTTON: val.i 0/1 */ -int k2_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { char buf[KENWOOD_MAX_BUF_LEN]; int err; diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index 0d1f9b0ea..19fff8297 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -147,8 +147,8 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int k3_get_vfo(RIG *rig, vfo_t *vfo); int k3_set_vfo(RIG *rig, vfo_t vfo); -int k3_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val); -int k3_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val); +int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); +int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit); int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); @@ -1386,7 +1386,7 @@ int k3_get_vfo(RIG *rig, vfo_t *vfo) * See Private Elecraft extra levels definitions in elecraft.c and * private token #define in elecraft.h */ -int k3_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { char buf[10]; @@ -1435,7 +1435,7 @@ int k3_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) * STRING: val.cs for set, val.s for get * CHECKBUTTON: val.i 0/1 */ -int k3_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { char buf[KENWOOD_MAX_BUF_LEN]; int err; diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 501277d96..7870ef440 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -5851,7 +5851,7 @@ int kenwood_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0)); } -int kenwood_set_ext_parm(RIG *rig, token_t token, value_t val) +int kenwood_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { struct kenwood_priv_data *priv = rig->state.priv; char buf[4]; @@ -5883,7 +5883,7 @@ int kenwood_set_ext_parm(RIG *rig, token_t token, value_t val) RETURNFUNC(-RIG_EINVAL); } -int kenwood_get_ext_parm(RIG *rig, token_t token, value_t *val) +int kenwood_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { int err; struct kenwood_priv_data *priv = rig->state.priv; diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 6c2fdbcb5..03f8aaad9 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -227,8 +227,8 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int kenwood_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); -int kenwood_set_ext_parm(RIG *rig, token_t token, value_t val); -int kenwood_get_ext_parm(RIG *rig, token_t token, value_t *val); +int kenwood_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val); +int kenwood_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val); int kenwood_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone); int kenwood_set_ctcss_tone_tn(RIG *rig, vfo_t vfo, tone_t tone); int kenwood_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone); diff --git a/rigs/kenwood/tmd710.c b/rigs/kenwood/tmd710.c index ab9bf7de7..0acddb997 100644 --- a/rigs/kenwood/tmd710.c +++ b/rigs/kenwood/tmd710.c @@ -87,9 +87,9 @@ static int tmd710_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); static int tmd710_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); static int tmd710_get_parm(RIG *rig, setting_t parm, value_t *val); static int tmd710_set_parm(RIG *rig, setting_t parm, value_t val); -static int tmd710_get_ext_level(RIG *rig, vfo_t vfo, token_t token, +static int tmd710_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); -static int tmd710_set_ext_level(RIG *rig, vfo_t vfo, token_t token, +static int tmd710_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); #define TMD710_MODES (RIG_MODE_FM|RIG_MODE_FMN|RIG_MODE_AM) @@ -2907,7 +2907,7 @@ int tmd710_set_parm(RIG *rig, setting_t parm, value_t val) * Assumes rig!=NULL, rig->state.priv!=NULL, val!=NULL * */ -int tmd710_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int tmd710_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int retval; tmd710_mu mu_struct; @@ -2941,7 +2941,7 @@ int tmd710_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) * Assumes rig!=NULL, rig->state.priv!=NULL * */ -int tmd710_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +int tmd710_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { int retval; tmd710_mu mu_struct; diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index 1e7212884..1ec0fabb1 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -1026,7 +1026,7 @@ static int ts2000_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) RETURNFUNC(RIG_OK); } -static int ts2000_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) +static int ts2000_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status) { char cmdbuf[20]; int retval; @@ -1052,7 +1052,7 @@ static int ts2000_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) RETURNFUNC(retval); } -static int ts2000_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) +static int ts2000_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status) { int retval; @@ -1085,7 +1085,7 @@ static int ts2000_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) RETURNFUNC(retval); } -static int ts2000_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +static int ts2000_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { int retval; @@ -1145,7 +1145,7 @@ static int ts2000_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) RETURNFUNC(retval); } -static int ts2000_get_ext_level(RIG *rig, vfo_t vfo, token_t token, +static int ts2000_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int retval; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 54ea51dda..41269c2f1 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -847,7 +847,7 @@ static int ts480_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) RETURNFUNC(RIG_OK); } -static int ts480_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) +static int ts480_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status) { char cmdbuf[20]; int retval; @@ -900,7 +900,7 @@ static int ts480_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) RETURNFUNC(retval); } -static int ts480_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) +static int ts480_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status) { int retval; @@ -945,7 +945,7 @@ static int ts480_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) RETURNFUNC(retval); } -static int ts480_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +static int ts480_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { int retval; char cmdbuf[20]; @@ -1035,7 +1035,7 @@ static int ts480_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) RETURNFUNC(retval); } -static int ts480_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +static int ts480_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int retval; int value; diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c index df9dbb9f0..b829d575e 100644 --- a/rigs/kenwood/ts590.c +++ b/rigs/kenwood/ts590.c @@ -1157,7 +1157,7 @@ static int ts590_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) RETURNFUNC(RIG_OK); } -static int ts590_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) +static int ts590_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status) { char cmdbuf[20]; int retval; @@ -1183,7 +1183,7 @@ static int ts590_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) RETURNFUNC(retval); } -static int ts590_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) +static int ts590_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status) { int retval; @@ -1216,7 +1216,7 @@ static int ts590_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) RETURNFUNC(retval); } -static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +static int ts590_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { int retval; @@ -1435,7 +1435,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) RETURNFUNC(retval); } -static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +static int ts590_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int retval; int value; diff --git a/rigs/kit/dds60.c b/rigs/kit/dds60.c index ccd6acb38..e8936c10a 100644 --- a/rigs/kit/dds60.c +++ b/rigs/kit/dds60.c @@ -80,8 +80,8 @@ static int dds60_init(RIG *rig); static int dds60_cleanup(RIG *rig); static int dds60_open(RIG *rig); static int dds60_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -static int dds60_set_conf(RIG *rig, token_t token, const char *val); -static int dds60_get_conf(RIG *rig, token_t token, char *val); +static int dds60_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int dds60_get_conf(RIG *rig, hamlib_token_t token, char *val); /* * The DDS-60 kit exists with a AD9851 chip (60 MHz), @@ -208,7 +208,7 @@ int dds60_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int dds60_set_conf(RIG *rig, token_t token, const char *val) +int dds60_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct dds60_priv_data *priv; float phase; @@ -246,7 +246,7 @@ int dds60_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int dds60_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int dds60_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct dds60_priv_data *priv; @@ -277,7 +277,7 @@ int dds60_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int dds60_get_conf(RIG *rig, token_t token, char *val) +int dds60_get_conf(RIG *rig, hamlib_token_t token, char *val) { return dds60_get_conf2(rig, token, val, 128); } diff --git a/rigs/kit/drt1.c b/rigs/kit/drt1.c index 2780e9c5d..50fe4405f 100644 --- a/rigs/kit/drt1.c +++ b/rigs/kit/drt1.c @@ -79,8 +79,8 @@ static const struct confparams drt1_cfg_params[] = static int drt1_init(RIG *rig); static int drt1_cleanup(RIG *rig); static int drt1_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -static int drt1_set_conf(RIG *rig, token_t token, const char *val); -static int drt1_get_conf(RIG *rig, token_t token, char *val); +static int drt1_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int drt1_get_conf(RIG *rig, hamlib_token_t token, char *val); /* * SAT-Service Schneider DRM tuner. @@ -208,7 +208,7 @@ int drt1_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int drt1_set_conf(RIG *rig, token_t token, const char *val) +int drt1_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct drt1_priv_data *priv; @@ -244,7 +244,7 @@ int drt1_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int drt1_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int drt1_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct drt1_priv_data *priv; @@ -275,7 +275,7 @@ int drt1_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int drt1_get_conf(RIG *rig, token_t token, char *val) +int drt1_get_conf(RIG *rig, hamlib_token_t token, char *val) { return drt1_get_conf2(rig, token, val, 128); } diff --git a/rigs/kit/elektor304.c b/rigs/kit/elektor304.c index d676b9d82..1eab6a2d5 100644 --- a/rigs/kit/elektor304.c +++ b/rigs/kit/elektor304.c @@ -65,8 +65,8 @@ static const struct confparams elektor304_cfg_params[] = static int elektor304_init(RIG *rig); static int elektor304_cleanup(RIG *rig); static int elektor304_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -static int elektor304_set_conf(RIG *rig, token_t token, const char *val); -static int elektor304_get_conf(RIG *rig, token_t token, char *val); +static int elektor304_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int elektor304_get_conf(RIG *rig, hamlib_token_t token, char *val); /* * The Elektor DRM Receiver 3/04 COM interface is based on the Visual Basic @@ -198,7 +198,7 @@ int elektor304_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int elektor304_set_conf(RIG *rig, token_t token, const char *val) +int elektor304_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct elektor304_priv_data *priv; @@ -226,7 +226,7 @@ int elektor304_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int elektor304_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int elektor304_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct elektor304_priv_data *priv; @@ -249,7 +249,7 @@ int elektor304_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int elektor304_get_conf(RIG *rig, token_t token, char *val) +int elektor304_get_conf(RIG *rig, hamlib_token_t token, char *val) { return elektor304_get_conf2(rig, token, val, 128); } diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c index 5d095bd4d..ed4d82799 100644 --- a/rigs/kit/elektor507.c +++ b/rigs/kit/elektor507.c @@ -52,8 +52,8 @@ static int elektor507_get_level(RIG *rig, vfo_t vfo, setting_t level, static int elektor507_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option); static int elektor507_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx); -static int elektor507_set_conf(RIG *rig, token_t token, const char *val); -static int elektor507_get_conf(RIG *rig, token_t token, char *val); +static int elektor507_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int elektor507_get_conf(RIG *rig, hamlib_token_t token, char *val); static const char *elektor507_get_info(RIG *rig); @@ -641,7 +641,7 @@ struct rig_caps elektor507_caps = }; -int elektor507_set_conf(RIG *rig, token_t token, const char *val) +int elektor507_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct elektor507_priv_data *priv; freq_t freq; @@ -666,7 +666,7 @@ int elektor507_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int elektor507_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int elektor507_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct elektor507_priv_data *priv; @@ -689,7 +689,7 @@ int elektor507_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int elektor507_get_conf(RIG *rig, token_t token, char *val) +int elektor507_get_conf(RIG *rig, hamlib_token_t token, char *val) { return elektor507_get_conf2(rig, token, val, 128); } diff --git a/rigs/kit/fifisdr.c b/rigs/kit/fifisdr.c index 70e7c07bb..671b06d7f 100644 --- a/rigs/kit/fifisdr.c +++ b/rigs/kit/fifisdr.c @@ -92,7 +92,7 @@ static int fifisdr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, static int fifisdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); static int fifisdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, token_t token, +static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); @@ -807,7 +807,7 @@ static int fifisdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) -static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, token_t token, +static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { int ret = RIG_OK; diff --git a/rigs/kit/hiqsdr.c b/rigs/kit/hiqsdr.c index 0215d8f39..147d3a9a7 100644 --- a/rigs/kit/hiqsdr.c +++ b/rigs/kit/hiqsdr.c @@ -60,8 +60,8 @@ static int hiqsdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); static int hiqsdr_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); static int hiqsdr_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option); -static int hiqsdr_set_conf(RIG *rig, token_t token, const char *val); -static int hiqsdr_get_conf(RIG *rig, token_t token, char *val); +static int hiqsdr_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int hiqsdr_get_conf(RIG *rig, hamlib_token_t token, char *val); static int hiqsdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); static int hiqsdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); @@ -225,7 +225,7 @@ static unsigned compute_sample_rate(const struct hiqsdr_priv_data *priv) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int hiqsdr_set_conf(RIG *rig, token_t token, const char *val) +int hiqsdr_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct hiqsdr_priv_data *priv; struct rig_state *rs; @@ -257,7 +257,7 @@ int hiqsdr_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int hiqsdr_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int hiqsdr_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct hiqsdr_priv_data *priv; struct rig_state *rs; @@ -282,7 +282,7 @@ int hiqsdr_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int hiqsdr_get_conf(RIG *rig, token_t token, char *val) +int hiqsdr_get_conf(RIG *rig, hamlib_token_t token, char *val) { return hiqsdr_get_conf2(rig, token, val, 128); } diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c index 50e0ca89e..f2c8c96ec 100644 --- a/rigs/kit/si570avrusb.c +++ b/rigs/kit/si570avrusb.c @@ -64,8 +64,8 @@ static int si570xxxusb_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); static int si570xxxusb_set_freq_by_value(RIG *rig, vfo_t vfo, freq_t freq); static int si570xxxusb_get_freq_by_value(RIG *rig, vfo_t vfo, freq_t *freq); static int si570xxxusb_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); -static int si570xxxusb_set_conf(RIG *rig, token_t token, const char *val); -static int si570xxxusb_get_conf(RIG *rig, token_t token, char *val); +static int si570xxxusb_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int si570xxxusb_get_conf(RIG *rig, hamlib_token_t token, char *val); static const char *si570xxxusb_get_info(RIG *rig); @@ -862,7 +862,7 @@ int si570xxxusb_cleanup(RIG *rig) return RIG_OK; } -int si570xxxusb_set_conf(RIG *rig, token_t token, const char *val) +int si570xxxusb_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct si570xxxusb_priv_data *priv; freq_t freq; @@ -925,7 +925,7 @@ int si570xxxusb_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int si570xxxusb_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int si570xxxusb_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct si570xxxusb_priv_data *priv; priv = (struct si570xxxusb_priv_data *)rig->state.priv; @@ -955,7 +955,7 @@ int si570xxxusb_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int si570xxxusb_get_conf(RIG *rig, token_t token, char *val) +int si570xxxusb_get_conf(RIG *rig, hamlib_token_t token, char *val) { return si570xxxusb_get_conf2(rig, token, val, 128); } diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index d33bfa8be..b7e521bc7 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -1354,7 +1354,7 @@ pcr_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) int -pcr_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +pcr_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { rig_debug(RIG_DEBUG_VERBOSE, "%s: tok = %s\n", __func__, rig_strlevel(token)); diff --git a/rigs/pcr/pcr.h b/rigs/pcr/pcr.h index 9c35466e0..e38be1d53 100644 --- a/rigs/pcr/pcr.h +++ b/rigs/pcr/pcr.h @@ -104,7 +104,7 @@ int pcr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int pcr_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); int pcr_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); -int pcr_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val); +int pcr_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); int pcr_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone); int pcr_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone); diff --git a/rigs/racal/ra37xx.c b/rigs/racal/ra37xx.c index c19b00c94..7b987d81e 100644 --- a/rigs/racal/ra37xx.c +++ b/rigs/racal/ra37xx.c @@ -253,7 +253,7 @@ int ra37xx_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int ra37xx_set_conf2(RIG *rig, token_t token, const char *val, int val_len) +int ra37xx_set_conf2(RIG *rig, hamlib_token_t token, const char *val, int val_len) { struct ra37xx_priv_data *priv = (struct ra37xx_priv_data *)rig->state.priv; int receiver_id; @@ -278,7 +278,7 @@ int ra37xx_set_conf2(RIG *rig, token_t token, const char *val, int val_len) return RIG_OK; } -int ra37xx_set_conf(RIG *rig, token_t token, const char *val) +int ra37xx_set_conf(RIG *rig, hamlib_token_t token, const char *val) { return ra37xx_set_conf2(rig, token, val, 128); } @@ -288,7 +288,7 @@ int ra37xx_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int ra37xx_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int ra37xx_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { const struct ra37xx_priv_data *priv = (struct ra37xx_priv_data *) rig->state.priv; @@ -306,7 +306,7 @@ int ra37xx_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int ra37xx_get_conf(RIG *rig, token_t token, char *val) +int ra37xx_get_conf(RIG *rig, hamlib_token_t token, char *val) { return ra37xx_get_conf2(rig, token, val, 128); } diff --git a/rigs/racal/ra37xx.h b/rigs/racal/ra37xx.h index 217e22b80..844a18cbf 100644 --- a/rigs/racal/ra37xx.h +++ b/rigs/racal/ra37xx.h @@ -64,8 +64,8 @@ struct ra37xx_priv_data { int receiver_id; }; -int ra37xx_set_conf(RIG *rig, token_t token, const char *val); -int ra37xx_get_conf(RIG *rig, token_t token, char *val); +int ra37xx_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int ra37xx_get_conf(RIG *rig, hamlib_token_t token, char *val); int ra37xx_init(RIG *rig); int ra37xx_cleanup(RIG *rig); int ra37xx_open(RIG *rig); diff --git a/rigs/racal/racal.c b/rigs/racal/racal.c index 34ef7cab9..57d14d231 100644 --- a/rigs/racal/racal.c +++ b/rigs/racal/racal.c @@ -162,7 +162,7 @@ int racal_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int racal_set_conf(RIG *rig, token_t token, const char *val) +int racal_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct racal_priv_data *priv = (struct racal_priv_data *)rig->state.priv; @@ -184,7 +184,7 @@ int racal_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int racal_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int racal_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { const struct racal_priv_data *priv = (struct racal_priv_data *)rig->state.priv; @@ -201,7 +201,7 @@ int racal_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int racal_get_conf(RIG *rig, token_t token, char *val) +int racal_get_conf(RIG *rig, hamlib_token_t token, char *val) { return racal_get_conf2(rig, token, val, 128); } diff --git a/rigs/racal/racal.h b/rigs/racal/racal.h index d8ea7c102..6d4641be2 100644 --- a/rigs/racal/racal.h +++ b/rigs/racal/racal.h @@ -37,8 +37,8 @@ struct racal_priv_data { float threshold; /* attenuation */ }; -int racal_set_conf(RIG *rig, token_t token, const char *val); -int racal_get_conf(RIG *rig, token_t token, char *val); +int racal_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int racal_get_conf(RIG *rig, hamlib_token_t token, char *val); int racal_init(RIG *rig); int racal_cleanup(RIG *rig); int racal_open(RIG *rig); diff --git a/rigs/tentec/rx331.c b/rigs/tentec/rx331.c index 9afa54a75..32cde62c4 100644 --- a/rigs/tentec/rx331.c +++ b/rigs/tentec/rx331.c @@ -67,8 +67,8 @@ static const struct confparams rx331_cfg_params[] = static int rx331_init(RIG *rig); static int rx331_cleanup(RIG *rig); -static int rx331_set_conf(RIG *rig, token_t token, const char *val); -static int rx331_get_conf(RIG *rig, token_t token, char *val); +static int rx331_set_conf(RIG *rig, hamlib_token_t token, const char *val); +static int rx331_get_conf(RIG *rig, hamlib_token_t token, char *val); static int rx331_open(RIG *rig); static int rx331_close(RIG *rig); static int rx331_set_freq(RIG *rig, vfo_t vfo, freq_t freq); @@ -323,7 +323,7 @@ int rx331_cleanup(RIG *rig) return RIG_OK; } -int rx331_set_conf(RIG *rig, token_t token, const char *val) +int rx331_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct rx331_priv_data *priv = (struct rx331_priv_data *)rig->state.priv; @@ -340,7 +340,7 @@ int rx331_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int rx331_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int rx331_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { const struct rx331_priv_data *priv = (struct rx331_priv_data *)rig->state.priv; @@ -357,7 +357,7 @@ int rx331_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int rx331_get_conf(RIG *rig, token_t token, char *val) +int rx331_get_conf(RIG *rig, hamlib_token_t token, char *val) { return rx331_get_conf2(rig, token, val, 128); } diff --git a/rigs/winradio/g313-posix.c b/rigs/winradio/g313-posix.c index a79787f7a..62271fee8 100644 --- a/rigs/winradio/g313-posix.c +++ b/rigs/winradio/g313-posix.c @@ -542,7 +542,7 @@ static const char *g313_get_info(RIG *rig) return info.SerNum; } -int g313_set_conf(RIG *rig, token_t token, const char *val) +int g313_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct g313_priv_data *priv = (struct g313_priv_data *)rig->state.priv; @@ -593,7 +593,7 @@ int g313_set_conf(RIG *rig, token_t token, const char *val) return RIG_OK; } -int g313_get_conf(RIG *rig, token_t token, char *val) +int g313_get_conf(RIG *rig, hamlib_token_t token, char *val) { struct g313_priv_data *priv = (struct g313_priv_data *)rig->state.priv; diff --git a/rigs/wj/wj.c b/rigs/wj/wj.c index f5b7c90d5..d8129a91b 100644 --- a/rigs/wj/wj.c +++ b/rigs/wj/wj.c @@ -253,7 +253,7 @@ int wj_cleanup(RIG *rig) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -int wj_set_conf(RIG *rig, token_t token, const char *val) +int wj_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct wj_priv_data *priv = (struct wj_priv_data *)rig->state.priv; @@ -275,7 +275,7 @@ int wj_set_conf(RIG *rig, token_t token, const char *val) * Assumes rig!=NULL, rig->state.priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int wj_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int wj_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { const struct wj_priv_data *priv = (struct wj_priv_data *)rig->state.priv; @@ -292,7 +292,7 @@ int wj_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -int wj_get_conf(RIG *rig, token_t token, char *val) +int wj_get_conf(RIG *rig, hamlib_token_t token, char *val) { return wj_get_conf2(rig, token, val, 128); } diff --git a/rigs/wj/wj.h b/rigs/wj/wj.h index 7813520a8..bbd28ec70 100644 --- a/rigs/wj/wj.h +++ b/rigs/wj/wj.h @@ -42,8 +42,8 @@ struct wj_priv_data { value_t rawstr; }; -int wj_set_conf(RIG *rig, token_t token, const char *val); -int wj_get_conf(RIG *rig, token_t token, char *val); +int wj_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int wj_get_conf(RIG *rig, hamlib_token_t token, char *val); int wj_init(RIG *rig); int wj_cleanup(RIG *rig); int wj_set_freq(RIG *rig, vfo_t vfo, freq_t freq); diff --git a/rigs/yaesu/ft757gx.c b/rigs/yaesu/ft757gx.c index 67f1d36d3..a771edc4e 100644 --- a/rigs/yaesu/ft757gx.c +++ b/rigs/yaesu/ft757gx.c @@ -51,8 +51,8 @@ static int ft757_init(RIG *rig); static int ft757_cleanup(RIG *rig); static int ft757_open(RIG *rig); -static int ft757gx_get_conf(RIG *rig, token_t token, char *val); -static int ft757gx_set_conf(RIG *rig, token_t token, const char *val); +static int ft757gx_get_conf(RIG *rig, hamlib_token_t token, char *val); +static int ft757gx_set_conf(RIG *rig, hamlib_token_t token, const char *val); static int ft757_set_freq(RIG *rig, vfo_t vfo, freq_t freq); static int ft757_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); @@ -898,7 +898,7 @@ static int rig2mode(RIG *rig, int md, rmode_t *mode, pbwidth_t *width) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -static int ft757gx_get_conf2(RIG *rig, token_t token, char *val, int val_len) +static int ft757gx_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct ft757_priv_data *priv; struct rig_state *rs; @@ -924,7 +924,7 @@ static int ft757gx_get_conf2(RIG *rig, token_t token, char *val, int val_len) return RIG_OK; } -static int ft757gx_get_conf(RIG *rig, token_t token, char *val) +static int ft757gx_get_conf(RIG *rig, hamlib_token_t token, char *val) { return ft757gx_get_conf2(rig, token, val, 128); } @@ -932,7 +932,7 @@ static int ft757gx_get_conf(RIG *rig, token_t token, char *val) /* * Assumes rig!=NULL, rig->state.priv!=NULL */ -static int ft757gx_set_conf(RIG *rig, token_t token, const char *val) +static int ft757gx_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct ft757_priv_data *priv; struct rig_state *rs; diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 3299ccbb6..ae74cbbd5 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -743,7 +743,7 @@ int newcat_close(RIG *rig) * Set Configuration Token for Yaesu Radios */ -int newcat_set_conf(RIG *rig, token_t token, const char *val) +int newcat_set_conf(RIG *rig, hamlib_token_t token, const char *val) { int ret = RIG_OK; struct newcat_priv_data *priv; @@ -796,7 +796,7 @@ int newcat_set_conf(RIG *rig, token_t token, const char *val) * Get Configuration Token for Yaesu Radios */ -int newcat_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int newcat_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { int ret = RIG_OK; struct newcat_priv_data *priv; @@ -6940,12 +6940,12 @@ int newcat_get_parm(RIG *rig, setting_t parm, value_t *val) RETURNFUNC(-RIG_ENAVAIL); } -static int newcat_set_maxpower(RIG *rig, vfo_t vfo, token_t token, float val) +static int newcat_set_maxpower(RIG *rig, vfo_t vfo, hamlib_token_t token, float val) { return -RIG_ENIMPL; } -static int newcat_get_maxpower(RIG *rig, vfo_t vfo, token_t token, value_t *val) +static int newcat_get_maxpower(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; int retval; @@ -7007,7 +7007,7 @@ static int newcat_get_maxpower(RIG *rig, vfo_t vfo, token_t token, value_t *val) } -int newcat_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) +int newcat_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; @@ -7060,7 +7060,7 @@ int newcat_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) } } -int newcat_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) +int newcat_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; char *result; @@ -7189,7 +7189,7 @@ int newcat_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) RETURNFUNC(RIG_OK); } -int newcat_set_ext_parm(RIG *rig, token_t token, value_t val) +int newcat_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { ENTERFUNC; @@ -7197,7 +7197,7 @@ int newcat_set_ext_parm(RIG *rig, token_t token, value_t val) } -int newcat_get_ext_parm(RIG *rig, token_t token, value_t *val) +int newcat_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { ENTERFUNC; diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 6951fa310..e0bd69f7c 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -172,9 +172,9 @@ int newcat_cleanup(RIG *rig); int newcat_open(RIG *rig); int newcat_close(RIG *rig); -int newcat_set_conf(RIG *rig, token_t token, const char *val); -int newcat_get_conf(RIG *rig, token_t token, char *val); -int newcat_get_conf2(RIG *rig, token_t token, char *val, int val_len); +int newcat_set_conf(RIG *rig, hamlib_token_t token, const char *val); +int newcat_get_conf(RIG *rig, hamlib_token_t token, char *val); +int newcat_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len); int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); @@ -233,8 +233,8 @@ rmode_t newcat_rmode(char mode); char newcat_modechar(rmode_t rmode); rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width); -int newcat_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val); -int newcat_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val); +int newcat_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); +int newcat_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); int newcat_send_morse(RIG *rig, vfo_t vfo, const char *msg); int newcat_send_voice_mem(RIG *rig, vfo_t vfo, int ch); diff --git a/rotators/easycomm/easycomm.c b/rotators/easycomm/easycomm.c index 99c3a64b6..1fc846c34 100644 --- a/rotators/easycomm/easycomm.c +++ b/rotators/easycomm/easycomm.c @@ -412,7 +412,7 @@ static const char *easycomm_rot_get_info(ROT *rot) * For configuration registers, *val must contain string of register e.g. '0'-'f' */ -static int easycomm_rot_get_conf(ROT *rot, token_t token, char *val) +static int easycomm_rot_get_conf(ROT *rot, hamlib_token_t token, char *val) { char cmdstr[16], ackbuf[32]; int retval; @@ -484,7 +484,7 @@ static int easycomm_rot_get_conf(ROT *rot, token_t token, char *val) * e.g. x,yyyyy */ -static int easycomm_rot_set_conf(ROT *rot, token_t token, const char *val) +static int easycomm_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { char cmdstr[16]; int retval; diff --git a/rotators/flir/flir.c b/rotators/flir/flir.c index 7303675a0..d09611ac6 100644 --- a/rotators/flir/flir.c +++ b/rotators/flir/flir.c @@ -238,12 +238,12 @@ static int flir_close(ROT *rot) return RIG_OK; } -static int flir_set_conf(ROT *rot, token_t token, const char *val) +static int flir_set_conf(ROT *rot, hamlib_token_t token, const char *val) { return -RIG_ENIMPL; } -static int flir_get_conf(ROT *rot, token_t token, char *val) +static int flir_get_conf(ROT *rot, hamlib_token_t token, char *val) { return -RIG_ENIMPL; } @@ -459,22 +459,22 @@ static int flir_get_level(ROT *rot, setting_t level, value_t *val) return -RIG_ENIMPL; } -static int flir_set_ext_level(ROT *rot, token_t token, value_t val) +static int flir_set_ext_level(ROT *rot, hamlib_token_t token, value_t val) { return -RIG_ENIMPL; } -static int flir_get_ext_level(ROT *rot, token_t token, value_t *val) +static int flir_get_ext_level(ROT *rot, hamlib_token_t token, value_t *val) { return -RIG_ENIMPL; } -static int flir_set_ext_func(ROT *rot, token_t token, int status) +static int flir_set_ext_func(ROT *rot, hamlib_token_t token, int status) { return -RIG_ENIMPL; } -static int flir_get_ext_func(ROT *rot, token_t token, int *status) +static int flir_get_ext_func(ROT *rot, hamlib_token_t token, int *status) { return -RIG_ENIMPL; } @@ -489,12 +489,12 @@ static int flir_get_parm(ROT *rot, setting_t parm, value_t *val) return -RIG_ENIMPL; } -static int flir_set_ext_parm(ROT *rot, token_t token, value_t val) +static int flir_set_ext_parm(ROT *rot, hamlib_token_t token, value_t val) { return -RIG_ENIMPL; } -static int flir_get_ext_parm(ROT *rot, token_t token, value_t *val) +static int flir_get_ext_parm(ROT *rot, hamlib_token_t token, value_t *val) { return -RIG_ENIMPL; } diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 0c81a54fe..92a9cc443 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -404,7 +404,7 @@ grbltrk_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) } static int -grbltrk_rot_set_conf(ROT *rot, token_t token, const char *val) +grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { uint32_t resp_size, len; diff --git a/rotators/rotorez/rotorez.c b/rotators/rotorez/rotorez.c index c685e2587..fe166e9ee 100644 --- a/rotators/rotorez/rotorez.c +++ b/rotators/rotorez/rotorez.c @@ -67,7 +67,7 @@ static int rotorez_rot_reset(ROT *rot, rot_reset_t reset); static int rotorez_rot_stop(ROT *rot); static int dcu1_rot_stop(ROT *rot); -static int rotorez_rot_set_conf(ROT *rot, token_t token, const char *val); +static int rotorez_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val); static const char *rotorez_rot_get_info(ROT *rot); @@ -1016,7 +1016,7 @@ static int dcu1_rot_stop(ROT *rot) * define in rotorez.h and *val of '1' or '0' (enable/disable). */ -static int rotorez_rot_set_conf(ROT *rot, token_t token, const char *val) +static int rotorez_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { char cmdstr[2]; char c; diff --git a/rotators/spid/spid.c b/rotators/spid/spid.c index d32e1a067..a8689bbc4 100644 --- a/rotators/spid/spid.c +++ b/rotators/spid/spid.c @@ -238,7 +238,7 @@ static int spid_rot_cleanup(ROT *rot) return RIG_OK; } -static int spid_get_conf2(ROT *rot, token_t token, char *val, int val_len) +static int spid_get_conf2(ROT *rot, hamlib_token_t token, char *val, int val_len) { const struct spid_rot2prog_priv_data *priv = (struct spid_rot2prog_priv_data *) rot->state.priv; @@ -268,12 +268,12 @@ static int spid_get_conf2(ROT *rot, token_t token, char *val, int val_len) return RIG_OK; } -static int spid_get_conf(ROT *rot, token_t token, char *val) +static int spid_get_conf(ROT *rot, hamlib_token_t token, char *val) { return spid_get_conf2(rot, token, val, 128); } -static int spid_set_conf(ROT *rot, token_t token, const char *val) +static int spid_set_conf(ROT *rot, hamlib_token_t token, const char *val) { struct spid_rot2prog_priv_data *priv = (struct spid_rot2prog_priv_data *) rot->state.priv; diff --git a/src/amp_conf.c b/src/amp_conf.c index ac5f5a8b2..1ae86f905 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -105,7 +105,7 @@ static const struct confparams ampfrontend_serial_cfg_params[] = * * \sa frontamp_get_conf() */ -int frontamp_set_conf(AMP *amp, token_t token, const char *val) +int frontamp_set_conf(AMP *amp, hamlib_token_t token, const char *val) { struct amp_state *rs; int val_i; @@ -371,7 +371,7 @@ int frontamp_set_conf(AMP *amp, token_t token, const char *val) * * \sa frontamp_set_conf() */ -int frontamp_get_conf2(AMP *amp, token_t token, char *val, int val_len) +int frontamp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len) { struct amp_state *rs; const char *s; @@ -590,7 +590,7 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, const char *name) { const struct confparams *cfp; - token_t token; + hamlib_token_t token; amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -647,7 +647,7 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, * * \sa amp_confparam_lookup() */ -token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) +hamlib_token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) { const struct confparams *cfp; @@ -682,7 +682,7 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) * * \sa amp_get_conf() */ -int HAMLIB_API amp_set_conf(AMP *amp, token_t token, const char *val) +int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val) { amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -738,7 +738,7 @@ int HAMLIB_API amp_set_conf(AMP *amp, token_t token, const char *val) * * \sa amp_set_conf() */ -int HAMLIB_API amp_get_conf2(AMP *amp, token_t token, char *val, int val_len) +int HAMLIB_API amp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -760,7 +760,7 @@ int HAMLIB_API amp_get_conf2(AMP *amp, token_t token, char *val, int val_len) return amp->caps->get_conf(amp, token, val); } -int HAMLIB_API amp_get_conf(AMP *amp, token_t token, char *val) +int HAMLIB_API amp_get_conf(AMP *amp, hamlib_token_t token, char *val) { return amp_get_conf2(amp, token, val, 128); } diff --git a/src/amp_conf.h b/src/amp_conf.h index 26a96de22..1e98e76fd 100644 --- a/src/amp_conf.h +++ b/src/amp_conf.h @@ -24,8 +24,8 @@ #include -int frontamp_set_conf(AMP *amp, token_t token, const char *val); -static int frontamp_get_conf2(AMP *amp, token_t token, char *val, int val_len); +int frontamp_set_conf(AMP *amp, hamlib_token_t token, const char *val); +static int frontamp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len); #endif /* _AMP_CONF_H */ diff --git a/src/amplifier.c b/src/amplifier.c index bf5987865..896f71f9c 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -830,7 +830,7 @@ int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val) * * \sa amp_set_level() */ -int HAMLIB_API amp_set_ext_level(AMP *amp, token_t level, value_t val) +int HAMLIB_API amp_set_ext_level(AMP *amp, hamlib_token_t level, value_t val) { amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -865,7 +865,7 @@ int HAMLIB_API amp_set_ext_level(AMP *amp, token_t level, value_t val) * * \sa amp_get_level() */ -int HAMLIB_API amp_get_ext_level(AMP *amp, token_t level, value_t *val) +int HAMLIB_API amp_get_ext_level(AMP *amp, hamlib_token_t level, value_t *val) { amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/src/conf.c b/src/conf.c index 5099a0fad..ea73768a7 100644 --- a/src/conf.c +++ b/src/conf.c @@ -235,7 +235,7 @@ static const struct confparams frontend_serial_cfg_params[] = * frontend_set_conf * assumes rig!=NULL, val!=NULL */ -static int frontend_set_conf(RIG *rig, token_t token, const char *val) +static int frontend_set_conf(RIG *rig, hamlib_token_t token, const char *val) { struct rig_caps *caps; struct rig_state *rs; @@ -832,7 +832,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) * frontend_get_conf * assumes rig!=NULL, val!=NULL */ -static int frontend_get_conf2(RIG *rig, token_t token, char *val, int val_len) +static int frontend_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct rig_state *rs; const char *s = ""; @@ -1292,7 +1292,7 @@ const struct confparams *HAMLIB_API rig_confparam_lookup(RIG *rig, const char *name) { const struct confparams *cfp; - token_t token; + hamlib_token_t token; rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__, name); @@ -1344,7 +1344,7 @@ const struct confparams *HAMLIB_API rig_confparam_lookup(RIG *rig, * * \return the token id if found, otherwise RIG_CONF_END */ -token_t HAMLIB_API rig_token_lookup(RIG *rig, const char *name) +hamlib_token_t HAMLIB_API rig_token_lookup(RIG *rig, const char *name) { const struct confparams *cfp; @@ -1375,7 +1375,7 @@ token_t HAMLIB_API rig_token_lookup(RIG *rig, const char *name) * * \sa rig_get_conf() */ -int HAMLIB_API rig_set_conf(RIG *rig, token_t token, const char *val) +int HAMLIB_API rig_set_conf(RIG *rig, hamlib_token_t token, const char *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -1436,12 +1436,12 @@ int HAMLIB_API rig_set_conf(RIG *rig, token_t token, const char *val) * * \sa rig_set_conf() */ -int HAMLIB_API rig_get_conf(RIG *rig, token_t token, char *val) +int HAMLIB_API rig_get_conf(RIG *rig, hamlib_token_t token, char *val) { return rig_get_conf2(rig, token, val, 128); } -int HAMLIB_API rig_get_conf2(RIG *rig, token_t token, char *val, int val_len) +int HAMLIB_API rig_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/src/ext.c b/src/ext.c index 50c7b36b5..2f082abff 100644 --- a/src/ext.c +++ b/src/ext.c @@ -44,7 +44,7 @@ #include "token.h" -static int rig_has_ext_token(RIG *rig, token_t token) +static int rig_has_ext_token(RIG *rig, hamlib_token_t token) { const int *ext_tokens = rig->caps->ext_tokens; int i; @@ -276,7 +276,7 @@ const struct confparams *HAMLIB_API rig_ext_lookup(RIG *rig, const char *name) * * Returns NULL if nothing found */ -const struct confparams *HAMLIB_API rig_ext_lookup_tok(RIG *rig, token_t token) +const struct confparams *HAMLIB_API rig_ext_lookup_tok(RIG *rig, hamlib_token_t token) { const struct confparams *cfp; @@ -320,7 +320,7 @@ const struct confparams *HAMLIB_API rig_ext_lookup_tok(RIG *rig, token_t token) * \param name * \brief Simple lookup returning token id associated with name */ -token_t HAMLIB_API rig_ext_token_lookup(RIG *rig, const char *name) +hamlib_token_t HAMLIB_API rig_ext_token_lookup(RIG *rig, const char *name) { const struct confparams *cfp; diff --git a/src/extamp.c b/src/extamp.c index afd3b0551..9b0abcc99 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -217,7 +217,7 @@ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) * \return A pointer to the containing #confparams structure member or NULL if * nothing found or if \a amp is NULL or inconsistent. */ -const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) +const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, hamlib_token_t token) { const struct confparams *cfp; @@ -262,7 +262,7 @@ const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) * * \sa amp_ext_lookup() */ -token_t HAMLIB_API amp_ext_token_lookup(AMP *amp, const char *name) +hamlib_token_t HAMLIB_API amp_ext_token_lookup(AMP *amp, const char *name) { const struct confparams *cfp; diff --git a/src/rot_conf.c b/src/rot_conf.c index bfb9a2527..bc7fc20a4 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -136,7 +136,7 @@ static const struct confparams rotfrontend_serial_cfg_params[] = * * \sa frontrot_get_conf() */ -int frontrot_set_conf(ROT *rot, token_t token, const char *val) +int frontrot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { struct rot_state *rs; int val_i; @@ -410,7 +410,7 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) * * \sa frontrot_set_conf() */ -int frontrot_get_conf(ROT *rot, token_t token, char *val, int val_len) +int frontrot_get_conf(ROT *rot, hamlib_token_t token, char *val, int val_len) { struct rot_state *rs; const char *s; @@ -650,7 +650,7 @@ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, const char *name) { const struct confparams *cfp; - token_t token; + hamlib_token_t token; //rot_debug(RIG_DEBUG_VERBOSE, "%s called lookup=%s\n", __func__, name); @@ -711,7 +711,7 @@ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, * * \sa rot_confparam_lookup() */ -token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) +hamlib_token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) { const struct confparams *cfp; @@ -746,7 +746,7 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) * * \sa rot_get_conf() */ -int HAMLIB_API rot_set_conf(ROT *rot, token_t token, const char *val) +int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -803,15 +803,15 @@ int HAMLIB_API rot_set_conf(ROT *rot, token_t token, const char *val) * \sa rot_set_conf() */ // This call will change in Hamlib 5.0 to pass val_len in -//int HAMLIB_API rot_get_conf(ROT *rot, token_t token, char *val, int val_len) +//int HAMLIB_API rot_get_conf(ROT *rot, hamlib_token_t token, char *val, int val_len) -int HAMLIB_API rot_get_conf(ROT *rot, token_t token, char *val) +int HAMLIB_API rot_get_conf(ROT *rot, hamlib_token_t token, char *val) { // 128 is the default size we are called with return rot_get_conf2(rot, token, val, 128); } -int HAMLIB_API rot_get_conf2(ROT *rot, token_t token, char *val, int val_len) +int HAMLIB_API rot_get_conf2(ROT *rot, hamlib_token_t token, char *val, int val_len) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/src/rot_conf.h b/src/rot_conf.h index 1c8d7f8cb..ee6460adb 100644 --- a/src/rot_conf.h +++ b/src/rot_conf.h @@ -24,8 +24,8 @@ #include -int frontrot_set_conf(ROT *rot, token_t token, const char *val); -int frontrot_get_conf(ROT *rot, token_t token, char *val, int val_len); +int frontrot_set_conf(ROT *rot, hamlib_token_t token, const char *val); +int frontrot_get_conf(ROT *rot, hamlib_token_t token, char *val, int val_len); #endif /* _ROT_CONF_H */ diff --git a/src/rot_ext.c b/src/rot_ext.c index 704d4fbba..6ec03fe97 100644 --- a/src/rot_ext.c +++ b/src/rot_ext.c @@ -48,7 +48,7 @@ #include "token.h" -static int rot_has_ext_token(ROT *rot, token_t token) +static int rot_has_ext_token(ROT *rot, hamlib_token_t token) { const int *ext_tokens = rot->caps->ext_tokens; int i; @@ -312,7 +312,7 @@ const struct confparams *HAMLIB_API rot_ext_lookup(ROT *rot, const char *name) * \return A pointer to the containing #confparams structure member or NULL if * nothing found or if \a rot is NULL or inconsistent. */ -const struct confparams *HAMLIB_API rot_ext_lookup_tok(ROT *rot, token_t token) +const struct confparams *HAMLIB_API rot_ext_lookup_tok(ROT *rot, hamlib_token_t token) { const struct confparams *cfp; @@ -365,7 +365,7 @@ const struct confparams *HAMLIB_API rot_ext_lookup_tok(ROT *rot, token_t token) * * \sa rot_ext_lookup() */ -token_t HAMLIB_API rot_ext_token_lookup(ROT *rot, const char *name) +hamlib_token_t HAMLIB_API rot_ext_token_lookup(ROT *rot, const char *name) { const struct confparams *cfp; diff --git a/src/rot_settings.c b/src/rot_settings.c index bb85f4b98..a75c55844 100644 --- a/src/rot_settings.c +++ b/src/rot_settings.c @@ -554,7 +554,7 @@ int HAMLIB_API rot_get_func(ROT *rot, setting_t func, int *status) * * \sa rot_get_ext_level() */ -int HAMLIB_API rot_set_ext_level(ROT *rot, token_t token, value_t val) +int HAMLIB_API rot_set_ext_level(ROT *rot, hamlib_token_t token, value_t val) { const struct rot_caps *caps; @@ -594,7 +594,7 @@ int HAMLIB_API rot_set_ext_level(ROT *rot, token_t token, value_t val) * * \sa rot_set_ext_level() */ -int HAMLIB_API rot_get_ext_level(ROT *rot, token_t token, value_t *val) +int HAMLIB_API rot_get_ext_level(ROT *rot, hamlib_token_t token, value_t *val) { const struct rot_caps *caps; @@ -638,7 +638,7 @@ int HAMLIB_API rot_get_ext_level(ROT *rot, token_t token, value_t *val) * * \sa rot_get_ext_func() */ -int HAMLIB_API rot_set_ext_func(ROT *rot, token_t token, int status) +int HAMLIB_API rot_set_ext_func(ROT *rot, hamlib_token_t token, int status) { const struct rot_caps *caps; @@ -682,7 +682,7 @@ int HAMLIB_API rot_set_ext_func(ROT *rot, token_t token, int status) * * \sa rot_set_ext_func() */ -int HAMLIB_API rot_get_ext_func(ROT *rot, token_t token, int *status) +int HAMLIB_API rot_get_ext_func(ROT *rot, hamlib_token_t token, int *status) { const struct rot_caps *caps; @@ -724,7 +724,7 @@ int HAMLIB_API rot_get_ext_func(ROT *rot, token_t token, int *status) * * \sa rot_get_ext_parm() */ -int HAMLIB_API rot_set_ext_parm(ROT *rot, token_t token, value_t val) +int HAMLIB_API rot_set_ext_parm(ROT *rot, hamlib_token_t token, value_t val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -762,7 +762,7 @@ int HAMLIB_API rot_set_ext_parm(ROT *rot, token_t token, value_t val) * * \sa rot_set_ext_parm() */ -int HAMLIB_API rot_get_ext_parm(ROT *rot, token_t token, value_t *val) +int HAMLIB_API rot_get_ext_parm(ROT *rot, hamlib_token_t token, value_t *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/src/settings.c b/src/settings.c index efa6f1677..4add0858a 100644 --- a/src/settings.c +++ b/src/settings.c @@ -646,7 +646,7 @@ int HAMLIB_API rig_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) */ int HAMLIB_API rig_set_ext_level(RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, value_t val) { const struct rig_caps *caps; @@ -712,7 +712,7 @@ int HAMLIB_API rig_set_ext_level(RIG *rig, */ int HAMLIB_API rig_get_ext_level(RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, value_t *val) { const struct rig_caps *caps; @@ -777,7 +777,7 @@ int HAMLIB_API rig_get_ext_level(RIG *rig, */ int HAMLIB_API rig_set_ext_func(RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, int status) { const struct rig_caps *caps; @@ -843,7 +843,7 @@ int HAMLIB_API rig_set_ext_func(RIG *rig, */ int HAMLIB_API rig_get_ext_func(RIG *rig, vfo_t vfo, - token_t token, + hamlib_token_t token, int *status) { const struct rig_caps *caps; @@ -906,7 +906,7 @@ int HAMLIB_API rig_get_ext_func(RIG *rig, * * \sa rig_get_ext_parm() */ -int HAMLIB_API rig_set_ext_parm(RIG *rig, token_t token, value_t val) +int HAMLIB_API rig_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -938,7 +938,7 @@ int HAMLIB_API rig_set_ext_parm(RIG *rig, token_t token, value_t val) * * \sa rig_set_ext_parm() */ -int HAMLIB_API rig_get_ext_parm(RIG *rig, token_t token, value_t *val) +int HAMLIB_API rig_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/tests/ampctl.c b/tests/ampctl.c index 33b023585..6fc5ccb8e 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -303,7 +303,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = amp_token_lookup(my_amp, mytoken); diff --git a/tests/ampctld.c b/tests/ampctld.c index eebf6251a..e827e2539 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -328,7 +328,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = amp_token_lookup(my_amp, mytoken); diff --git a/tests/rigctl.c b/tests/rigctl.c index 062baa746..d0ec7f397 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -565,7 +565,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = rig_token_lookup(my_rig, mytoken); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 20911ff79..daf817492 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -5849,7 +5849,7 @@ declare_proto_rig(get_conf) return RIG_OK; } - token_t mytoken = rig_token_lookup(rig, arg1); + hamlib_token_t mytoken = rig_token_lookup(rig, arg1); if (mytoken == 0) { @@ -5887,7 +5887,7 @@ declare_proto_rig(set_conf) return RIG_OK; } - token_t mytoken = rig_token_lookup(rig, arg1); + hamlib_token_t mytoken = rig_token_lookup(rig, arg1); if (mytoken == 0) { diff --git a/tests/rigctld.c b/tests/rigctld.c index 9f18d61b4..c209b1032 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -665,7 +665,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = rig_token_lookup(my_rig, mytoken); diff --git a/tests/rotctl.c b/tests/rotctl.c index d7309a755..12d6ce7e2 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = rot_token_lookup(my_rot, mytoken); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index cac9b954c..49c16135d 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1686,7 +1686,7 @@ declare_proto_rot(get_conf) return RIG_OK; } - token_t mytoken = rot_token_lookup(rot, arg1); + hamlib_token_t mytoken = rot_token_lookup(rot, arg1); if (mytoken == 0) { @@ -1725,7 +1725,7 @@ declare_proto_rot(set_conf) return RIG_OK; } - token_t mytoken = rot_token_lookup(rot, arg1); + hamlib_token_t mytoken = rot_token_lookup(rot, arg1); if (mytoken == 0) { diff --git a/tests/rotctld.c b/tests/rotctld.c index 028652742..c231ce93d 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -350,7 +350,7 @@ int main(int argc, char *argv[]) while (token) { char mytoken[100], myvalue[100]; - token_t lookup; + hamlib_token_t lookup; sscanf(token, "%99[^=]=%99s", mytoken, myvalue); //printf("mytoken=%s,myvalue=%s\n",mytoken, myvalue); lookup = rot_token_lookup(my_rot, mytoken);