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

Function cliFunc_echo

Scan/Infinity_60/scan_loop.c:120–141  ·  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

118
119// XXX Just an example command showing how to parse arguments (more complex than generally needed)
120void cliFunc_echo( char* args )
121{
122 char* curArgs;
123 char* arg1Ptr;
124 char* arg2Ptr = args;
125
126 // Parse args until a \0 is found
127 while ( 1 )
128 {
129 print( NL ); // No \r\n by default after the command is entered
130
131 curArgs = arg2Ptr; // Use the previous 2nd arg pointer to separate the next arg from the list
132 CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
133
134 // Stop processing args if no more are found
135 if ( *arg1Ptr == '\0' )
136 break;
137
138 // Print out the arg
139 dPrint( arg1Ptr );
140 }
141}
142

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…