Verbeterd interrupt mechanisme en afbreken van het Glk programma
[rodin/chimara.git] / src / first.c
index 3f004a89c14f5428b1c49d1b614cfdf0c345a855..a80314941e8f8370e24ae9d9ee5ab95cc97a4cac 100644 (file)
@@ -62,10 +62,17 @@ static void verb_unscript(void);
 static void verb_save(void);
 static void verb_restore(void);
 
+void handler(void)
+{
+       fprintf(stderr, "I'm the interrupt handler!\n");
+}
+
 /* The glk_main() function is called by the Glk system; it's the main entry
     point for your program. */
 void glk_main(void)
 {
+       glk_set_interrupt_handler(&handler);
+       
     /* Open the main window. */
     mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, 1);
     if (!mainwin) {