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

Function parse_array_double

rigs/dummy/netrigctl.c:221–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221int parse_array_double(const char *s, const char *delim, double *array,
222 int array_len)
223{
224 char *p;
225 char *dup = strdup(s);
226 char *rest = dup;
227 int n = 0;
228
229 while ((p = strtok_r(rest, delim, &rest)))
230 {
231 if (n == array_len) // too many items
232 {
233 return n;
234 }
235
236 array[n] = atof(p);
237 //printf("%f\n", array[n]);
238 ++n;
239 }
240
241 free(dup);
242 return n;
243}
244
245
246

Callers 2

ifFunction · 0.85
ifFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected