1 |
|
/* |
2 |
|
* clip_amiga.cpp - Clipboard handling, AmigaOS implementation |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2001 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
*/ |
20 |
|
|
21 |
+ |
#include "sysdeps.h" |
22 |
+ |
|
23 |
|
#include <exec/types.h> |
24 |
|
#include <libraries/iffparse.h> |
25 |
|
#include <devices/clipboard.h> |
26 |
+ |
#define __USE_SYSBASE |
27 |
|
#include <proto/exec.h> |
28 |
|
#include <proto/iffparse.h> |
29 |
+ |
#include <inline/exec.h> |
30 |
+ |
#include <inline/iffparse.h> |
31 |
|
|
27 |
– |
#include "sysdeps.h" |
32 |
|
#include "clip.h" |
33 |
+ |
#include "prefs.h" |
34 |
|
|
35 |
|
#define DEBUG 0 |
36 |
|
#include "debug.h" |
40 |
|
static struct IFFHandle *iffw = NULL; |
41 |
|
static struct ClipboardHandle *ch = NULL; |
42 |
|
static bool clipboard_open = false; |
43 |
+ |
static bool no_clip_conversion; |
44 |
|
|
45 |
|
|
46 |
|
// Conversion tables |
70 |
|
|
71 |
|
void ClipInit(void) |
72 |
|
{ |
73 |
+ |
no_clip_conversion = PrefsFindBool("noclipconversion"); |
74 |
+ |
|
75 |
|
// Create clipboard IFF handle |
76 |
|
iffw = AllocIFF(); |
77 |
|
if (iffw) { |
124 |
|
uint8 c = *p++; |
125 |
|
if (c < 0x80) { |
126 |
|
if (c == 13) // CR -> LF |
127 |
< |
c == 10; |
128 |
< |
} else |
127 |
> |
c = 10; |
128 |
> |
} else if (!no_clip_conversion) |
129 |
|
c = mac2iso[c & 0x7f]; |
130 |
|
*q++ = c; |
131 |
|
} |