Add character to the input line ===========================================================================
| 9525 | // Add character to the input line |
| 9526 | //=========================================================================== |
| 9527 | void DebuggerInputConsoleChar ( char ch ) |
| 9528 | { |
| 9529 | _ASSERT(g_nAppMode == MODE_DEBUG); |
| 9530 | |
| 9531 | if (g_nAppMode != MODE_DEBUG) |
| 9532 | return; |
| 9533 | |
| 9534 | if (g_bConsoleBufferPaused) |
| 9535 | return; |
| 9536 | |
| 9537 | if (g_bIgnoreNextKey) |
| 9538 | { |
| 9539 | g_bIgnoreNextKey = false; |
| 9540 | return; |
| 9541 | } |
| 9542 | |
| 9543 | if (ch == CONSOLE_COLOR_ESCAPE_CHAR) |
| 9544 | return; |
| 9545 | |
| 9546 | if (g_nConsoleInputSkip == ch) |
| 9547 | return; |
| 9548 | |
| 9549 | if (ch == CHAR_SPACE) |
| 9550 | { |
| 9551 | // If don't have console input, don't pass space to the input line |
| 9552 | // exception: pass to assembler |
| 9553 | if ((! g_nConsoleInputChars) && (! g_bAssemblerInput)) |
| 9554 | return; |
| 9555 | } |
| 9556 | |
| 9557 | if (g_nConsoleInputChars > g_nConsoleInputMaxLen) |
| 9558 | return; |
| 9559 | |
| 9560 | if ((ch >= CHAR_SPACE) && (ch <= 126)) // HACK MAGIC # 32 -> ' ', # 126 |
| 9561 | { |
| 9562 | if ((ch == TCHAR_QUOTE_DOUBLE) || (ch == TCHAR_QUOTE_SINGLE)) |
| 9563 | g_bConsoleInputQuoted = ! g_bConsoleInputQuoted; |
| 9564 | |
| 9565 | if (!g_bConsoleInputQuoted) |
| 9566 | { |
| 9567 | // TODO: must fix param matching to ignore case |
| 9568 | #if ALLOW_INPUT_LOWERCASE |
| 9569 | #else |
| 9570 | ch = (char)CharUpper((LPTSTR)ch); |
| 9571 | #endif |
| 9572 | } |
| 9573 | ConsoleInputChar( ch ); |
| 9574 | |
| 9575 | DebuggerCursorNext(); |
| 9576 | |
| 9577 | DrawConsoleInput(); |
| 9578 | StretchBltMemToFrameDC(); |
| 9579 | } |
| 9580 | else |
| 9581 | if (ch == 0x16) // HACK: Ctrl-V. WTF!? |
| 9582 | { |
| 9583 | ProcessClipboardCommands(); |
| 9584 | } |
no test coverage detected