From 1b411feca65e1dbc05c94feeb02745dc05ce1499 Mon Sep 17 00:00:00 2001 From: Andrew Brobston Date: Sun, 18 Nov 2012 22:11:58 -0600 Subject: [PATCH] Added #ifdef GLK_MODULE_UNICODE To cure a link error with pre-Unicode versions of glk, such as the current xglk, only include the Unicode functions when the Unicode functions are defined in glk.h. --- glkop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glkop.c b/glkop.c index 0f01f7d..b3fb7e7 100644 --- a/glkop.c +++ b/glkop.c @@ -269,6 +269,7 @@ glui32 perform_glk(glui32 funcnum, glui32 numargs, glui32 *arglist) goto WrongArgNum; retval = glk_char_to_upper(arglist[0] & 0xFF); break; +#ifdef GLK_MODULE_UNICODE case 0x0128: /* put_char_uni */ if (numargs != 1) goto WrongArgNum; @@ -279,6 +280,7 @@ glui32 perform_glk(glui32 funcnum, glui32 numargs, glui32 *arglist) goto WrongArgNum; glk_put_char_stream_uni(find_stream_by_id(arglist[0]), arglist[1]); break; +#endif WrongArgNum: fatal_error("Wrong number of arguments to Glk function.");