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

Function cliFunc_echo

Scan/Deprecated/MBC1000/scan_loop.c:103–124  ·  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

101
102// XXX Just an example command showing how to parse arguments (more complex than generally needed)
103void cliFunc_echo( char* args )
104{
105 char* curArgs;
106 char* arg1Ptr;
107 char* arg2Ptr = args;
108
109 // Parse args until a \0 is found
110 while ( 1 )
111 {
112 print( NL ); // No \r\n by default after the command is entered
113
114 curArgs = arg2Ptr; // Use the previous 2nd arg pointer to separate the next arg from the list
115 CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
116
117 // Stop processing args if no more are found
118 if ( *arg1Ptr == '\0' )
119 break;
120
121 // Print out the arg
122 dPrint( arg1Ptr );
123 }
124}
125

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…