MCPcopy Create free account
hub / github.com/kiibohd/controller / cliFunc_echo

Function cliFunc_echo

Scan/Deprecated/DPH/scan_loop.c:925–946  ·  view source on GitHub ↗

XXX Just an example command showing how to parse arguments (more complex than generally needed)

Source from the content-addressed store, hash-verified

923
924// XXX Just an example command showing how to parse arguments (more complex than generally needed)
925void cliFunc_echo( char* args )
926{
927 char* curArgs;
928 char* arg1Ptr;
929 char* arg2Ptr = args;
930
931 // Parse args until a \0 is found
932 while ( 1 )
933 {
934 print( NL ); // No \r\n by default after the command is entered
935
936 curArgs = arg2Ptr; // Use the previous 2nd arg pointer to separate the next arg from the list
937 CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
938
939 // Stop processing args if no more are found
940 if ( *arg1Ptr == '\0' )
941 break;
942
943 // Print out the arg
944 dPrint( arg1Ptr );
945 }
946}
947
948void cliFunc_avgDebug( char* args )
949{

Callers

nothing calls this directly

Calls 1

CLI_argumentIsolationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…