ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/AmigaOS/clip_amiga.cpp
(Generate patch)

Comparing BasiliskII/src/AmigaOS/clip_amiga.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.9 by gbeauche, 2008-01-01T09:40:31Z

# Line 1 | Line 1
1   /*
2   *  clip_amiga.cpp - Clipboard handling, AmigaOS implementation
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2008 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
# Line 18 | Line 18
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"
# Line 35 | Line 40
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
# Line 64 | Line 70 | static const uint8 mac2iso[0x80] = {
70  
71   void ClipInit(void)
72   {
73 +        no_clip_conversion = PrefsFindBool("noclipconversion");
74 +
75          // Create clipboard IFF handle
76          iffw = AllocIFF();
77          if (iffw) {
# Line 91 | Line 99 | void ClipExit(void)
99  
100  
101   /*
102 + *  Mac application reads clipboard
103 + */
104 +
105 + void GetScrap(void **handle, uint32 type, int32 offset)
106 + {
107 +        D(bug("GetScrap handle %p, type %08x, offset %d\n", handle, type, offset));
108 + }
109 +
110 +
111 + /*
112   *  Mac application wrote to clipboard
113   */
114  
# Line 116 | Line 134 | void PutScrap(uint32 type, void *scrap,
134                                  uint8 c = *p++;
135                                  if (c < 0x80) {
136                                          if (c == 13)    // CR -> LF
137 <                                                c == 10;
138 <                                } else
137 >                                                c = 10;
138 >                                } else if (!no_clip_conversion)
139                                          c = mac2iso[c & 0x7f];
140                                  *q++ = c;
141                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines