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

Function CLI_saveHistory

Debug/cli/cli.c:505–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505inline void CLI_saveHistory( char *buff )
506{
507 if ( buff == NULL )
508 {
509 //clear the item
510 CLIHistoryBuffer[ CLIHistoryTail ][ 0 ] = '\0';
511 return;
512 }
513
514 // Don't write empty lines to the history
515 const char *cursor = buff;
516 while (*cursor == ' ') { cursor++; } // advance past the leading whitespace
517 if (*cursor == '\0') { return ; }
518
519 // Copy the line to the history
520 int i;
521 for (i = 0; i < CLILineBufferCurrent; i++)
522 {
523 CLIHistoryBuffer[ CLIHistoryTail ][ i ] = CLILineBuffer[ i ];
524 }
525}
526
527void CLI_retreiveHistory( int index )
528{

Callers 1

CLI_processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…