summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsignde <signde@openttd.org>2004-09-17 09:51:44 +0000
committersignde <signde@openttd.org>2004-09-17 09:51:44 +0000
commitf7cfd47261cdb03a2b1e93266d038fd62879daa4 (patch)
tree01cd552fe847a3b01b68b897510b5364f42d06b5
parent7693c58e280148334754b00fb4142930cc7f65ea (diff)
downloadopenttd-f7cfd47261cdb03a2b1e93266d038fd62879daa4.tar.xz
(svn r280) -Fix: ^M removement in console.c
-rw-r--r--console.c68
1 files 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 <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))
{