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

Comparing BasiliskII/src/Unix/clip_unix.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.9 by gbeauche, 2004-06-23T22:33:45Z

# Line 1 | Line 1
1   /*
2   *  clip_unix.cpp - Clipboard handling, Unix implementation
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2004 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 23 | Line 23
23   #include <X11/Xlib.h>
24  
25   #include "clip.h"
26 + #include "macos_util.h"
27 + #include "prefs.h"
28  
29   #define DEBUG 0
30   #include "debug.h"
# Line 52 | Line 54 | static const uint8 mac2iso[0x80] = {
54          0xaf, 0x20, 0xb7, 0xb0, 0xb8, 0x22, 0xb8, 0x20
55   };
56  
57 + // Flag: Don't convert clipboard text
58 + static bool no_clip_conversion;
59 +
60  
61   /*
62   *  Initialization
# Line 59 | Line 64 | static const uint8 mac2iso[0x80] = {
64  
65   void ClipInit(void)
66   {
67 +        no_clip_conversion = PrefsFindBool("noclipconversion");
68   }
69  
70  
# Line 82 | Line 88 | void PutScrap(uint32 type, void *scrap,
88                  return;
89  
90          switch (type) {
91 <                case 'TEXT':
91 >                case FOURCC('T','E','X','T'):
92                          D(bug(" clipping TEXT\n"));
93  
94                          // Convert text from Mac charset to ISO-Latin1
# Line 94 | Line 100 | void PutScrap(uint32 type, void *scrap,
100                                  if (c < 0x80) {
101                                          if (c == 13)    // CR -> LF
102                                                  c = 10;
103 <                                } else
103 >                                } else if (!no_clip_conversion)
104                                          c = mac2iso[c & 0x7f];
105                                  *q++ = c;
106                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines