+int gHasInited = 0;
+
+#ifdef CHIMARA_EXTENSIONS
+
+void fatalError (const char * s)
+{
+ winid_t win;
+ if (!gHasInited)
+ {
+ win = glk_window_open(0, 0, 0, wintype_TextBuffer, 0);
+ glk_set_window(win);
+ }
+ /* pray that this goes somewhere reasonable... */
+ glk_put_string("\n*** fatal error: ");
+ glk_put_string((char*)s);
+ glk_put_string(" ***\n");
+ glk_exit();
+}
+
+#else
+