kopia lustrzana https://github.com/Hamlib/Hamlib
Fix rig_idx2settings for 64-bit sprintf_list functions
rodzic
df4ec51909
commit
772b1ba2c1
|
@ -2267,8 +2267,7 @@ rigerror HAMLIB_PARAMS((int errnum));
|
||||||
extern HAMLIB_EXPORT(int)
|
extern HAMLIB_EXPORT(int)
|
||||||
rig_setting2idx HAMLIB_PARAMS((setting_t s));
|
rig_setting2idx HAMLIB_PARAMS((setting_t s));
|
||||||
|
|
||||||
#define rig_idx2setting(i) (1ULL<<(i))
|
extern setting_t rig_idx2setting(int i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Even if these functions are prefixed with "rig_", they are not rig specific
|
* Even if these functions are prefixed with "rig_", they are not rig specific
|
||||||
* Maybe "hamlib_" would have been better. Let me know. --SF
|
* Maybe "hamlib_" would have been better. Let me know. --SF
|
||||||
|
|
|
@ -522,6 +522,14 @@ static struct
|
||||||
{ RIG_FUNC_NONE, "" },
|
{ RIG_FUNC_NONE, "" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* utility function to convert index to bit value
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
uint64_t rig_idx2setting(int i)
|
||||||
|
{
|
||||||
|
return 1ULL << i;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert alpha string to enum RIG_FUNC_...
|
* \brief Convert alpha string to enum RIG_FUNC_...
|
||||||
|
|
|
@ -96,6 +96,7 @@ extern HAMLIB_EXPORT(int) rig_check_cache_timeout(const struct timeval *tv,
|
||||||
|
|
||||||
extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv);
|
extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv);
|
||||||
|
|
||||||
|
extern HAMLIB_EXPORT(setting_t) rig_idx2setting(int i);
|
||||||
|
|
||||||
#ifdef PRId64
|
#ifdef PRId64
|
||||||
/** \brief printf(3) format to be used for long long (64bits) type */
|
/** \brief printf(3) format to be used for long long (64bits) type */
|
||||||
|
|
Ładowanie…
Reference in New Issue