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

Function rp_getline

tests/rotctl_parse.c:341–367  ·  view source on GitHub ↗

Frees allocated memory and sets pointers to NULL before calling readline * and then parses the input into space separated tokens. */

Source from the content-addressed store, hash-verified

339 * and then parses the input into space separated tokens.
340 */
341static void rp_getline(const char *s)
342{
343 int i;
344
345 /* free allocated memory and set pointers to NULL */
346 if (input_line)
347 {
348 free(input_line);
349 input_line = (char *)NULL;
350 }
351
352 if (result)
353 {
354 result = (char *)NULL;
355 }
356
357 /* cmd, arg1, arg2, arg3, arg4, arg5, arg6
358 * arg5 and arg 6 are currently unused.
359 */
360 for (i = 0; i < 7; i++)
361 {
362 parsed_input[i] = NULL;
363 }
364
365 /* Action! Returns typed line with newline stripped. */
366 input_line = readline(s);
367}
368#endif
369
370

Callers 1

rotctl_parseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected