[Hamlib-developer] Kylix binding for Hamlib
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Francois R. <fgr...@su...> - 2002-01-14 10:57:51
|
Hello All,
I committed a binding for Borland's Kylix to the CVS.
Included in the tests/ directory is a small demo/test program.
It can select a rigs and open a very primative frequency display
dialog box. Will improve later..
One problem I found while testing the binding was that there is no
way to verify that a non-null rig pointer is pointing to a valid
rig structure. During testing I solved this by adding a magic
numbers to the rig structure.
Thus instead of
if (!rig || !rig->caps) {
return -RIG_EINVAL;
}
we also check the magic numbers.
if (!rig || rig->magic != RIG_MAGIC) {
return -RIG_EINVAL;
}
if (!rig->caps || rig->caps->magic != RIG_MAGIC_CAPS) {
return -RIG_EINVAL;
}
Should we add magic numbers to the rig structures? I can submit
a patch if there is a need.
--
Cheers
Francois Retief
--
---------------------------------------------------------------------
Electronic Systems Laboratory (ESL)
University of Stellenbosch
South Africa
Tel. +27-21-808-4472
** Developers of the SUNSAT micro-satellite **
http://sunsat.ee.sun.ac.za
|