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

Function sprintf_level_ext

src/sprintflst.c:348–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346
347
348int sprintf_level_ext(char *str, int nlen, const struct confparams *extlevels)
349{
350 int len = 0;
351
352 *str = '\0';
353
354 if (!extlevels)
355 {
356 return 0;
357 }
358
359 for (; extlevels->token != RIG_CONF_END; extlevels++)
360 {
361 if (!extlevels->name)
362 {
363 continue; /* no name */
364 }
365
366 switch (extlevels->type)
367 {
368 case RIG_CONF_INT:
369 case RIG_CONF_CHECKBUTTON:
370 case RIG_CONF_COMBO:
371 case RIG_CONF_NUMERIC:
372 case RIG_CONF_STRING:
373 case RIG_CONF_BINARY:
374 strcat(str, extlevels->name);
375 strcat(str, " ");
376 len += strlen(extlevels->name) + 1;
377 break;
378
379 case RIG_CONF_BUTTON:
380 /* ignore case RIG_CONF_BUTTON */
381 break;
382 }
383
384 check_buffer_overflow(str, len, nlen);
385 }
386
387 return len;
388}
389
390int rig_sprintf_level_gran(char *str, int nlen, setting_t level,
391 const gran_t *gran)

Callers 4

never_usedFunction · 0.85
rotctl_parse.cFile · 0.85
ampctl_parse.cFile · 0.85
rigctl_parse.cFile · 0.85

Calls 1

check_buffer_overflowFunction · 0.85

Tested by

no test coverage detected