]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Code cleanup from cli changes.
authorJacob Alexander <haata@kiibohd.com>
Wed, 8 Apr 2015 05:11:04 +0000 (22:11 -0700)
committerJacob Alexander <haata@kiibohd.com>
Wed, 8 Apr 2015 05:11:04 +0000 (22:11 -0700)
Debug/cli/cli.c
Debug/cli/cli.h

index b87d6113313661b69774a8e0092d80495a1ebd52..83bdfdc8f175b0a401a9d1ccd536c2644f69bccd 100644 (file)
@@ -160,7 +160,7 @@ void CLI_process()
                        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 @@ void CLI_process()
                        }
 
                        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 @@ void CLI_process()
                                        {
                                                // 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;
index d572073ef3bf20459f55d3d14613093a4dd21317..f4bd36d566e7a1aec90a4c7f09fa407cb3abd375 100644 (file)
@@ -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 -----