Skip to content

Commit 2b5f01f

Browse files
committed
64 bit mods to netrigctl.c testrig.c
1 parent 160c8f0 commit 2b5f01f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

dummy/netrigctl.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ static int netrigctl_open(RIG *rig)
113113
if (ret <= 0)
114114
return (ret < 0) ? ret : -RIG_EPROTO;
115115

116-
ret = num_sscanf(buf, "%"SCNfreq"%"SCNfreq"%llx%d%d%x%x",
116+
ret = num_sscanf(buf, "%"SCNfreq"%"SCNfreq"%"SCNXll"%d%d%x%x",
117117
&rs->rx_range_list[i].start,
118118
&rs->rx_range_list[i].end,
119-
&rs->rx_range_list[i].modes,
119+
(uint64_t*)&rs->rx_range_list[i].modes,
120120
&rs->rx_range_list[i].low_power,
121121
&rs->rx_range_list[i].high_power,
122122
&rs->rx_range_list[i].vfo,
@@ -132,10 +132,10 @@ static int netrigctl_open(RIG *rig)
132132
if (ret <= 0)
133133
return (ret < 0) ? ret : -RIG_EPROTO;
134134

135-
ret = num_sscanf(buf, "%"SCNfreq"%"SCNfreq"%llx%d%d%x%x",
135+
ret = num_sscanf(buf, "%"SCNfreq"%"SCNfreq"%"SCNXll"%d%d%x%x",
136136
&rs->tx_range_list[i].start,
137137
&rs->tx_range_list[i].end,
138-
&rs->tx_range_list[i].modes,
138+
(uint64_t*)&rs->tx_range_list[i].modes,
139139
&rs->tx_range_list[i].low_power,
140140
&rs->tx_range_list[i].high_power,
141141
&rs->tx_range_list[i].vfo,
@@ -151,8 +151,8 @@ static int netrigctl_open(RIG *rig)
151151
if (ret <= 0)
152152
return (ret < 0) ? ret : -RIG_EPROTO;
153153

154-
ret = sscanf(buf, "%llx%ld",
155-
&rs->tuning_steps[i].modes,
154+
ret = sscanf(buf, "%"SCNXll"%ld",
155+
(uint64_t*)&rs->tuning_steps[i].modes,
156156
&rs->tuning_steps[i].ts);
157157
if (ret != 2)
158158
return -RIG_EPROTO;
@@ -165,8 +165,8 @@ static int netrigctl_open(RIG *rig)
165165
if (ret <= 0)
166166
return (ret < 0) ? ret : -RIG_EPROTO;
167167

168-
ret = sscanf(buf, "%llx%ld",
169-
&rs->filters[i].modes,
168+
ret = sscanf(buf, "%"SCNXll"%ld",
169+
(uint64_t*)&rs->filters[i].modes,
170170
&rs->filters[i].width);
171171
if (ret != 2)
172172
return -RIG_EPROTO;

tests/testrig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include <hamlib/rig.h>
1111

12+
#include "misc.h"
13+
1214
#ifdef HAVE_CONFIG_H
1315
# include "config.h"
1416
#endif
@@ -401,7 +403,7 @@ int main(int argc, char *argv[])
401403

402404
if (retcode == RIG_OK)
403405
{
404-
printf("rig_get_mode: mode = %i \n", rmode);
406+
printf("rig_get_mode: mode = %"PRIll"\n", rmode);
405407
}
406408
else
407409
{

0 commit comments

Comments
 (0)