| 516 | } |
| 517 | |
| 518 | void handleCommand(const char* cmd) |
| 519 | { |
| 520 | s_commandHistory.push_back({ cmd }); |
| 521 | |
| 522 | TFE_Parser parser; |
| 523 | parser.init(cmd, strlen(cmd)); |
| 524 | |
| 525 | TokenList tokens; |
| 526 | parser.tokenizeLine(cmd, tokens); |
| 527 | if (tokens.size() < 1) |
| 528 | { |
| 529 | char errorMsg[CSTR_LEN]; |
| 530 | sprintf(errorMsg, "Invalid Command - only whitespace found."); |
| 531 | s_history.push_back({ c_historyErrorColor, errorMsg }); |
| 532 | return; |
| 533 | } |
| 534 | |
| 535 | execute(tokens, cmd); |
| 536 | } |
| 537 | |
| 538 | void update() |
| 539 | { |