Frotz now compiled to use Gargoyle extensions
authorfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Sun, 2 May 2010 20:00:18 +0000 (20:00 +0000)
committerfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Sun, 2 May 2010 20:00:18 +0000 (20:00 +0000)
interpreters/frotz/glkfrotz.h
libchimara/input.c
libchimara/strio.c

index 54747b1b33b109765e73da04b9fe4064dade72b2..85b2222164d6ee48934962d47158a5d6840f3aae 100644 (file)
@@ -35,6 +35,7 @@
 #include <time.h>
 
 #include "glk.h"
+#include <libchimara/garglk.h>
 
 extern int curr_status_ht;
 extern int mach_status_ht;
index 8b6d4c27662d5296e4b7df1a0ec0caedf40c6b7e..4bb92645402f254461a37eb95781d2857820a336 100644 (file)
@@ -417,6 +417,9 @@ on_shutdown_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win)
 gboolean
 on_char_input_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win)
 {
+       if(event->is_modifier)
+               return FALSE; /* don't stop the event */
+       
        glui32 keycode = keyval_to_glk_keycode(event->keyval, win->input_request_type == INPUT_REQUEST_CHARACTER_UNICODE);
 
        ChimaraGlk *glk = CHIMARA_GLK(gtk_widget_get_ancestor(widget, CHIMARA_TYPE_GLK));
index bac31537c231a69fb4749df5afc54400118e1aac..f668cb9484637431ad849f62246b0365cadc5c79 100644 (file)
@@ -258,6 +258,7 @@ write_buffer_to_stream_uni(strid_t str, glui32 *buf, glui32 len)
                        if(str->unicode && str->ubuffer)
                        {
                                int copycount = MIN(len, str->buflen - str->mark);
+                               g_printerr("Attempting to copy %d units; %d units of space left in buffer\n", len, str->buflen - str->mark);
                                memmove(str->ubuffer + str->mark, buf, copycount * sizeof(glui32));
                                str->mark += copycount;
                        }
@@ -265,6 +266,7 @@ write_buffer_to_stream_uni(strid_t str, glui32 *buf, glui32 len)
                        {
                                gchar *latin1 = convert_ucs4_to_latin1_binary(buf, len);
                                int copycount = MIN(len, str->buflen - str->mark);
+                               g_printerr("Attempting to copy %d units; %d units of space left in buffer\n", len, str->buflen - str->mark);
                                memmove(str->buffer + str->mark, latin1, copycount);
                                g_free(latin1);
                                str->mark += copycount;