--- BasiliskII/src/Unix/clip_unix.cpp 2000/04/10 18:53:01 1.2 +++ BasiliskII/src/Unix/clip_unix.cpp 2004/01/12 15:29:25 1.7 @@ -1,7 +1,7 @@ /* * clip_unix.cpp - Clipboard handling, Unix implementation * - * Basilisk II (C) 1997-2000 Christian Bauer + * Basilisk II (C) 1997-2004 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ #include #include "clip.h" +#include "macos_util.h" +#include "prefs.h" #define DEBUG 0 #include "debug.h" @@ -52,6 +54,9 @@ static const uint8 mac2iso[0x80] = { 0xaf, 0x20, 0xb7, 0xb0, 0xb8, 0x22, 0xb8, 0x20 }; +// Flag: Don't convert clipboard text +static bool no_clip_conversion; + /* * Initialization @@ -59,6 +64,7 @@ static const uint8 mac2iso[0x80] = { void ClipInit(void) { + no_clip_conversion = PrefsFindBool("noclipconversion"); } @@ -82,7 +88,7 @@ void PutScrap(uint32 type, void *scrap, return; switch (type) { - case 'TEXT': + case FOURCC('T','E','X','T'): D(bug(" clipping TEXT\n")); // Convert text from Mac charset to ISO-Latin1 @@ -94,7 +100,7 @@ void PutScrap(uint32 type, void *scrap, if (c < 0x80) { if (c == 13) // CR -> LF c = 10; - } else + } else if (!no_clip_conversion) c = mac2iso[c & 0x7f]; *q++ = c; }