MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / rot_sprintf_func

Function rot_sprintf_func

src/sprintflst.c:228–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227
228int rot_sprintf_func(char *str, int nlen, setting_t func)
229{
230 unsigned int i, len = 0;
231
232 *str = '\0';
233
234 if (func == ROT_FUNC_NONE)
235 {
236 return 0;
237 }
238
239 for (i = 0; i < RIG_SETTING_MAX; i++)
240 {
241 const char *ms = rot_strfunc(func & rig_idx2setting(i));
242
243 if (!ms || !ms[0])
244 {
245 continue; /* unknown, FIXME! */
246 }
247
248 strcat(str, ms);
249 strcat(str, " ");
250 len += strlen(ms) + 1;
251 check_buffer_overflow(str, len, nlen);
252 }
253
254 return len;
255}
256
257
258int rig_sprintf_level(char *str, int nlen, setting_t level)

Callers 2

dumpcaps_rotFunction · 0.85
rotctl_parse.cFile · 0.85

Calls 3

rot_strfuncFunction · 0.85
rig_idx2settingFunction · 0.85
check_buffer_overflowFunction · 0.85

Tested by

no test coverage detected