Mercurial > louis > kiibohd-controller
changeset 321:18c3c4924f20
Code cleanup from cli changes.
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 07 Apr 2015 22:11:04 -0700 |
parents | 64f43aad73af |
children | cc09f7e858bf |
files | Debug/cli/cli.c Debug/cli/cli.h |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Debug/cli/cli.c Thu Apr 02 23:55:51 2015 -0700 +++ b/Debug/cli/cli.c Tue Apr 07 22:11:04 2015 -0700 @@ -160,7 +160,7 @@ CLI_commandLookup(); // Add the command to the history - cli_saveHistory( CLILineBuffer ); + CLI_saveHistory( CLILineBuffer ); // Keep the array circular, discarding the older entries if ( CLIHistoryTail < CLIHistoryHead ) @@ -173,7 +173,7 @@ } CLIHistoryCurrent = CLIHistoryTail; // 'Up' starts at the last item - cli_saveHistory( NULL ); // delete the old temp buffer + CLI_saveHistory( NULL ); // delete the old temp buffer // Reset the buffer CLILineBufferCurrent = 0; @@ -212,20 +212,20 @@ { // Is first time pressing arrow. Save the current buffer CLILineBuffer[ prev_buf_pos ] = '\0'; - cli_saveHistory( CLILineBuffer ); + CLI_saveHistory( CLILineBuffer ); } // Grab the previus item from the history if there is one if ( RING_PREV( CLIHistoryCurrent ) != RING_PREV( CLIHistoryHead ) ) CLIHistoryCurrent = RING_PREV( CLIHistoryCurrent ); - cli_retreiveHistory( CLIHistoryCurrent ); + CLI_retreiveHistory( CLIHistoryCurrent ); } if ( CLILineBuffer[ prev_buf_pos + 2 ] == 0x42 ) // Hist next { // Grab the next item from the history if it exists if ( RING_NEXT( CLIHistoryCurrent ) != RING_NEXT( CLIHistoryTail ) ) CLIHistoryCurrent = RING_NEXT( CLIHistoryCurrent ); - cli_retreiveHistory( CLIHistoryCurrent ); + CLI_retreiveHistory( CLIHistoryCurrent ); } } return;
--- a/Debug/cli/cli.h Thu Apr 02 23:55:51 2015 -0700 +++ b/Debug/cli/cli.h Tue Apr 07 22:11:04 2015 -0700 @@ -67,8 +67,8 @@ const char name##CLIDict_DescEntry[] = description; #endif -#define RING_PREV(i) wrap(i-1,0,CLIMaxHistorySize-1) -#define RING_NEXT(i) wrap(i+1,0,CLIMaxHistorySize-1) +#define RING_PREV(i) CLI_wrap(i - 1, 0, CLIMaxHistorySize - 1) +#define RING_NEXT(i) CLI_wrap(i + 1, 0, CLIMaxHistorySize - 1) // ----- Structs -----