Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/2694a98f8160afe99376790c16f54898b7e58068
...commit
http://git.netsurf-browser.org/netsurf.git/commit/2694a98f8160afe99376790c16f54898b7e58068
...tree
http://git.netsurf-browser.org/netsurf.git/tree/2694a98f8160afe99376790c16f54898b7e58068
The branch, master has been updated
via 2694a98f8160afe99376790c16f54898b7e58068 (commit)
via 3a00eca53547fd3d27a792421757db42e77127e9 (commit)
from 0b0c6a4f6ae8d04546028f42440054508c6121d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/2694a98f8160afe99376790c16f54898b7e58068
commit 2694a98f8160afe99376790c16f54898b7e58068
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Remove any forcing of UTF-8 in the clipboard, as internally NetSurf will
use the UTF8 chunks now.
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index b6eac6e..b092650 100755
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -46,7 +46,6 @@
#define ID_UTF8 MAKE_ID('U','T','F','8')
struct IFFHandle *iffh = NULL;
-bool ami_utf8_clipboard = false; // force UTF-8 in clipboard
bool ami_add_to_clipboard(const char *text, size_t length, bool space);
static bool ami_copy_selection(const char *text, size_t length,
@@ -226,7 +225,7 @@ bool gui_empty_clipboard(void)
{
if(!(PushChunk(iffh,ID_FTXT,ID_FORM,IFFSIZE_UNKNOWN)))
{
- if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard)
+ if(nsoption_bool(utf8_clipboard))
{
if(!(PushChunk(iffh,0,ID_CSET,32)))
{
@@ -258,7 +257,7 @@ bool gui_add_to_clipboard(const char *text, size_t length,
bool space)
if(text == NULL) return true;
if(!(PushChunk(iffh,0,ID_CHRS,IFFSIZE_UNKNOWN))) {
- if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard) {
+ if(nsoption_bool(utf8_clipboard)) {
WriteChunkBytes(iffh,text,length);
} else {
buffer = ami_utf8_easy(text);
@@ -371,8 +370,6 @@ void ami_drag_selection(struct selection *s)
if(text_box = ami_text_box_at_point(gwin, (ULONG *)&x, (ULONG *)&y))
{
- ami_utf8_clipboard = true;
-
iffh = ami_clipboard_init_internal(1);
if(gui_copy_to_clipboard(s))
@@ -383,7 +380,6 @@ void ami_drag_selection(struct selection *s)
ami_clipboard_free_internal(iffh);
iffh = old_iffh;
- ami_utf8_clipboard = false;
}
else
{
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/3a00eca53547fd3d27a792421757db42e77127e9
commit 3a00eca53547fd3d27a792421757db42e77127e9
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Clear the StopChunks before scanning for the UTF8 chunk, otherwise we risk
thinking a CHRS chunk is a UTF8 chunk.
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index 66a4da2..b6eac6e 100755
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -53,6 +53,21 @@ static bool ami_copy_selection(const char *text, size_t
length,
struct box *box, void *handle, const char *whitespace_text,
size_t whitespace_length);
+static LONG ami_clipboard_iffp_do_nothing(struct Hook *hook, void *object,
LONG *cmd)
+{
+ return 0;
+}
+
+static void ami_clipboard_iffp_clear_stopchunk(struct IFFHandle *iffh, ULONG
iff_type, ULONG iff_chunk)
+{
+ static struct Hook entry_hook;
+
+ entry_hook.h_Entry = (void *)ami_clipboard_iffp_do_nothing;
+ entry_hook.h_Data = 0;
+
+ EntryHandler(iffh, iff_type, iff_chunk, IFFSLI_TOP, &entry_hook, NULL);
+}
+
struct IFFHandle *ami_clipboard_init_internal(int unit)
{
struct IFFHandle *iffhandle = NULL;
@@ -114,6 +129,10 @@ bool ami_clipboard_check_for_utf8(struct IFFHandle *iffh) {
bool utf8_chunk = false;
if(OpenIFF(iffh, IFFF_READ)) return false;
+
+ ami_clipboard_iffp_clear_stopchunk(iffh, ID_FTXT, ID_CSET);
+ ami_clipboard_iffp_clear_stopchunk(iffh, ID_FTXT, ID_CHRS);
+
if(!StopChunk(iffh, ID_FTXT, ID_UTF8)) {
error = ParseIFF(iffh, IFFPARSE_SCAN);
if(error != IFFERR_EOF)
-----------------------------------------------------------------------
Summary of changes:
amiga/clipboard.c | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index 66a4da2..b092650 100755
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -46,13 +46,27 @@
#define ID_UTF8 MAKE_ID('U','T','F','8')
struct IFFHandle *iffh = NULL;
-bool ami_utf8_clipboard = false; // force UTF-8 in clipboard
bool ami_add_to_clipboard(const char *text, size_t length, bool space);
static bool ami_copy_selection(const char *text, size_t length,
struct box *box, void *handle, const char *whitespace_text,
size_t whitespace_length);
+static LONG ami_clipboard_iffp_do_nothing(struct Hook *hook, void *object,
LONG *cmd)
+{
+ return 0;
+}
+
+static void ami_clipboard_iffp_clear_stopchunk(struct IFFHandle *iffh, ULONG
iff_type, ULONG iff_chunk)
+{
+ static struct Hook entry_hook;
+
+ entry_hook.h_Entry = (void *)ami_clipboard_iffp_do_nothing;
+ entry_hook.h_Data = 0;
+
+ EntryHandler(iffh, iff_type, iff_chunk, IFFSLI_TOP, &entry_hook, NULL);
+}
+
struct IFFHandle *ami_clipboard_init_internal(int unit)
{
struct IFFHandle *iffhandle = NULL;
@@ -114,6 +128,10 @@ bool ami_clipboard_check_for_utf8(struct IFFHandle *iffh) {
bool utf8_chunk = false;
if(OpenIFF(iffh, IFFF_READ)) return false;
+
+ ami_clipboard_iffp_clear_stopchunk(iffh, ID_FTXT, ID_CSET);
+ ami_clipboard_iffp_clear_stopchunk(iffh, ID_FTXT, ID_CHRS);
+
if(!StopChunk(iffh, ID_FTXT, ID_UTF8)) {
error = ParseIFF(iffh, IFFPARSE_SCAN);
if(error != IFFERR_EOF)
@@ -207,7 +225,7 @@ bool gui_empty_clipboard(void)
{
if(!(PushChunk(iffh,ID_FTXT,ID_FORM,IFFSIZE_UNKNOWN)))
{
- if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard)
+ if(nsoption_bool(utf8_clipboard))
{
if(!(PushChunk(iffh,0,ID_CSET,32)))
{
@@ -239,7 +257,7 @@ bool gui_add_to_clipboard(const char *text, size_t length,
bool space)
if(text == NULL) return true;
if(!(PushChunk(iffh,0,ID_CHRS,IFFSIZE_UNKNOWN))) {
- if(nsoption_bool(utf8_clipboard) || ami_utf8_clipboard) {
+ if(nsoption_bool(utf8_clipboard)) {
WriteChunkBytes(iffh,text,length);
} else {
buffer = ami_utf8_easy(text);
@@ -352,8 +370,6 @@ void ami_drag_selection(struct selection *s)
if(text_box = ami_text_box_at_point(gwin, (ULONG *)&x, (ULONG *)&y))
{
- ami_utf8_clipboard = true;
-
iffh = ami_clipboard_init_internal(1);
if(gui_copy_to_clipboard(s))
@@ -364,7 +380,6 @@ void ami_drag_selection(struct selection *s)
ami_clipboard_free_internal(iffh);
iffh = old_iffh;
- ami_utf8_clipboard = false;
}
else
{
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org