diff options
author | signde <signde@openttd.org> | 2004-09-17 09:51:44 +0000 |
---|---|---|
committer | signde <signde@openttd.org> | 2004-09-17 09:51:44 +0000 |
commit | f7cfd47261cdb03a2b1e93266d038fd62879daa4 (patch) | |
tree | 01cd552fe847a3b01b68b897510b5364f42d06b5 | |
parent | 7693c58e280148334754b00fb4142930cc7f65ea (diff) | |
download | openttd-f7cfd47261cdb03a2b1e93266d038fd62879daa4.tar.xz |
(svn r280) -Fix: ^M removement in console.c
-rw-r--r-- | console.c | 68 |
1 files changed, 34 insertions, 34 deletions
@@ -7,10 +7,10 @@ #include "variables.h" #include "hal.h" #include <stdarg.h> -#include "console.h"
-
-#ifdef WIN32
-#include <windows.h>
+#include "console.h" + +#ifdef WIN32 +#include <windows.h> #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)) { |