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

Function parse_array_int

rigs/dummy/netrigctl.c:198–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198int parse_array_int(const char *s, const char *delim, int *array, int array_len)
199{
200 char *p;
201 char *dup = strdup(s);
202 char *rest = dup;
203 int n = 0;
204
205 while ((p = strtok_r(rest, delim, &rest)))
206 {
207 if (n == array_len) // too many items
208 {
209 return n;
210 }
211
212 array[n] = atoi(p);
213 //printf("%d\n", array[n]);
214 ++n;
215 }
216
217 free(dup);
218 return n;
219}
220
221int parse_array_double(const char *s, const char *delim, double *array,
222 int array_len)

Callers 2

ifFunction · 0.85
ifFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected