From f7cfd47261cdb03a2b1e93266d038fd62879daa4 Mon Sep 17 00:00:00 2001 From: signde Date: Fri, 17 Sep 2004 09:51:44 +0000 Subject: (svn r280) -Fix: ^M removement in console.c --- console.c | 68 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/console.c b/console.c index d867bdf3b..27aa9b046 100644 --- a/console.c +++ b/console.c @@ -7,10 +7,10 @@ #include "variables.h" #include "hal.h" #include -#include "console.h" - -#ifdef WIN32 -#include +#include "console.h" + +#ifdef WIN32 +#include #endif // ** main console ** // @@ -50,31 +50,31 @@ static const WindowDesc _iconsole_window_desc = { /* *************** */ /* end of header */ -/* *************** */ - -static void IConsoleAppendClipboard() -{ -#ifdef WIN32 - if (IsClipboardFormatAvailable(CF_TEXT)) { - byte * data; - HGLOBAL cbuf; - int i; - - OpenClipboard(NULL); - cbuf = GetClipboardData(CF_TEXT); - data = (byte *) GlobalLock(cbuf); - - i=0; - while (IS_INT_INSIDE(data[i], 32, 256)) { - _iconsole_cmdline[_iconsole_cmdpos]=data[i]; - i++; - _iconsole_cmdpos++; - } - - GlobalUnlock(cbuf); - CloseClipboard(); - } -#endif +/* *************** */ + +static void IConsoleAppendClipboard() +{ +#ifdef WIN32 + if (IsClipboardFormatAvailable(CF_TEXT)) { + byte * data; + HGLOBAL cbuf; + int i; + + OpenClipboard(NULL); + cbuf = GetClipboardData(CF_TEXT); + data = (byte *) GlobalLock(cbuf); + + i=0; + while (IS_INT_INSIDE(data[i], 32, 256)) { + _iconsole_cmdline[_iconsole_cmdpos]=data[i]; + i++; + _iconsole_cmdpos++; + } + + GlobalUnlock(cbuf); + CloseClipboard(); + } +#endif } static void IConsoleClearCommand() @@ -132,11 +132,11 @@ static void IConsoleWndProc(Window *w, WindowEvent *e) break; case WE_KEYPRESS: - e->keypress.cont=false; - if (e->keypress.keycode == (WKC_CTRL | 'V')) - { - IConsoleAppendClipboard(); - SetWindowDirty(w); + e->keypress.cont=false; + if (e->keypress.keycode == (WKC_CTRL | 'V')) + { + IConsoleAppendClipboard(); + SetWindowDirty(w); } else if (e->keypress.keycode == (WKC_UP)) { -- cgit v1.2.3-70-g09d2