aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm72
1 files changed, 36 insertions, 36 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm b/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm
index d549911..a9123c7 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm
+++ b/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/OSXClipboard.mm
@@ -1,36 +1,36 @@
1// Copyright (C) 2005-2006 Etienne Petitjean 1// Copyright (C) 2005-2006 Etienne Petitjean
2// Copyright (C) 2007-2012 Christian Stehno 2// Copyright (C) 2007-2012 Christian Stehno
3// This file is part of the "Irrlicht Engine". 3// This file is part of the "Irrlicht Engine".
4// For conditions of distribution and use, see copyright notice in Irrlicht.h 4// For conditions of distribution and use, see copyright notice in Irrlicht.h
5 5
6#include "OSXClipboard.h" 6#include "OSXClipboard.h"
7#import <Cocoa/Cocoa.h> 7#import <Cocoa/Cocoa.h>
8 8
9void OSXCopyToClipboard(const char *text) 9void OSXCopyToClipboard(const char *text)
10{ 10{
11 NSString *str; 11 NSString *str;
12 NSPasteboard *board; 12 NSPasteboard *board;
13 13
14 if ((text != NULL) && (strlen(text) > 0)) 14 if ((text != NULL) && (strlen(text) > 0))
15 { 15 {
16 str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding]; 16 str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding];
17 board = [NSPasteboard generalPasteboard]; 17 board = [NSPasteboard generalPasteboard];
18 [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp]; 18 [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp];
19 [board setString:str forType:NSStringPboardType]; 19 [board setString:str forType:NSStringPboardType];
20 } 20 }
21} 21}
22 22
23char* OSXCopyFromClipboard() 23char* OSXCopyFromClipboard()
24{ 24{
25 NSString* str; 25 NSString* str;
26 NSPasteboard* board; 26 NSPasteboard* board;
27 char* result; 27 char* result;
28 28
29 result = NULL; 29 result = NULL;
30 board = [NSPasteboard generalPasteboard]; 30 board = [NSPasteboard generalPasteboard];
31 str = [board stringForType:NSStringPboardType]; 31 str = [board stringForType:NSStringPboardType];
32 if (str != nil) 32 if (str != nil)
33 result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; 33 result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
34 return (result); 34 return (result);
35} 35}
36 36