XXX Just an example command showing how to parse arguments (more complex than generally needed)
| 923 | |
| 924 | // XXX Just an example command showing how to parse arguments (more complex than generally needed) |
| 925 | void 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 | |
| 948 | void cliFunc_avgDebug( char* args ) |
| 949 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…