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

Function rig_sprintf_level

src/sprintflst.c:258–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256
257
258int rig_sprintf_level(char *str, int nlen, setting_t level)
259{
260 int i, len = 0;
261
262 *str = '\0';
263
264 if (level == RIG_LEVEL_NONE)
265 {
266 return 0;
267 }
268
269 for (i = 0; i < RIG_SETTING_MAX; i++)
270 {
271 const char *ms = rig_strlevel(level & rig_idx2setting(i));
272
273 if (!ms || !ms[0])
274 {
275 continue; /* unknown, FIXME! */
276 }
277
278 strcat(str, ms);
279 strcat(str, " ");
280 len += strlen(ms) + 1;
281 check_buffer_overflow(str, len, nlen);
282 }
283
284 return len;
285}
286
287
288int rot_sprintf_level(char *str, int nlen, setting_t level)

Callers 2

ampctl_parse.cFile · 0.85
rigctl_parse.cFile · 0.85

Calls 3

rig_strlevelFunction · 0.85
rig_idx2settingFunction · 0.85
check_buffer_overflowFunction · 0.85

Tested by

no test coverage detected