From 78652af29a2f39e626febd5f4213da57d3a13901 Mon Sep 17 00:00:00 2001 From: fliep Date: Sat, 23 May 2009 00:06:50 +0000 Subject: [PATCH] Separated library source code from testing code, fixing #6 --- Makefile.am | 2 +- configure.ac | 5 +- interpreters/frotz/Makefile.am | 3 - interpreters/frotz/fastmem.c | 6 +- interpreters/frotz/files.c | 2 +- interpreters/frotz/glkfrotz.h | 2 +- interpreters/frotz/main.c | 4 +- interpreters/frotz/quetzal.c | 2 +- interpreters/nitfol/Makefile.am | 3 - interpreters/nitfol/README | 18 + interpreters/nitfol/blorb.c | 2 +- interpreters/nitfol/gi_blorb.h | 96 ----- interpreters/nitfol/glk.h | 426 ---------------------- interpreters/nitfol/glkstart.h | 70 ---- interpreters/nitfol/main.c | 2 +- interpreters/nitfol/nitfol.h | 4 +- interpreters/nitfol/no_blorb.c | 2 +- interpreters/nitfol/startdos.c | 2 +- interpreters/nitfol/startunix.c | 2 +- {src => libchimara}/.svnignore | 0 libchimara/Makefile.am | 34 ++ {src => libchimara}/abort.c | 0 {src => libchimara}/abort.h | 0 {src => libchimara}/case.c | 0 {src => libchimara}/charset.c | 0 {src => libchimara}/charset.h | 0 {src => libchimara}/chimara-glk-private.h | 0 {src => libchimara}/chimara-glk.c | 0 {src => libchimara}/chimara-glk.h | 0 {src => libchimara}/doc.c | 0 {src => libchimara}/event.c | 0 {src => libchimara}/event.h | 0 {src => libchimara}/fileref.c | 0 {src => libchimara}/fileref.h | 0 {src => libchimara}/gestalt.c | 0 {src => libchimara}/gi_blorb.c | 0 {src => libchimara}/gi_blorb.h | 0 {src => libchimara}/glk.c | 0 {src => libchimara}/glk.h | 0 {src => libchimara}/glkstart.c | 0 {src => libchimara}/glkstart.h | 0 {src => libchimara}/input.c | 0 {src => libchimara}/input.h | 0 {src => libchimara}/magic.c | 0 {src => libchimara}/magic.h | 0 {src => libchimara}/resource.c | 0 {src => libchimara}/resource.h | 0 {src => libchimara}/stream.c | 0 {src => libchimara}/stream.h | 0 {src => libchimara}/strio.c | 0 {src => libchimara}/style.c | 0 {src => libchimara}/style.h | 0 {src => libchimara}/timer.c | 0 {src => libchimara}/timer.h | 0 {src => libchimara}/window.c | 0 {src => libchimara}/window.h | 1 - src/Makefile.am | 69 ---- {src => tests}/callbacks.c | 0 {src => tests}/callbacks.h | 1 - {src => tests}/chimara.glade | 0 {src => tests}/error.c | 0 {src => tests}/error.h | 0 {src => tests}/first.c | 2 +- {src => tests}/gridtest.c | 2 +- {src => tests}/main.c | 2 +- {src => tests}/model.c | 4 +- {src => tests}/multiwin.c | 2 +- {src => tests}/splittest.c | 2 +- 68 files changed, 78 insertions(+), 694 deletions(-) create mode 100644 interpreters/nitfol/README delete mode 100644 interpreters/nitfol/gi_blorb.h delete mode 100644 interpreters/nitfol/glk.h delete mode 100644 interpreters/nitfol/glkstart.h rename {src => libchimara}/.svnignore (100%) create mode 100644 libchimara/Makefile.am rename {src => libchimara}/abort.c (100%) rename {src => libchimara}/abort.h (100%) rename {src => libchimara}/case.c (100%) rename {src => libchimara}/charset.c (100%) rename {src => libchimara}/charset.h (100%) rename {src => libchimara}/chimara-glk-private.h (100%) rename {src => libchimara}/chimara-glk.c (100%) rename {src => libchimara}/chimara-glk.h (100%) rename {src => libchimara}/doc.c (100%) rename {src => libchimara}/event.c (100%) rename {src => libchimara}/event.h (100%) rename {src => libchimara}/fileref.c (100%) rename {src => libchimara}/fileref.h (100%) rename {src => libchimara}/gestalt.c (100%) rename {src => libchimara}/gi_blorb.c (100%) rename {src => libchimara}/gi_blorb.h (100%) rename {src => libchimara}/glk.c (100%) rename {src => libchimara}/glk.h (100%) rename {src => libchimara}/glkstart.c (100%) rename {src => libchimara}/glkstart.h (100%) rename {src => libchimara}/input.c (100%) rename {src => libchimara}/input.h (100%) rename {src => libchimara}/magic.c (100%) rename {src => libchimara}/magic.h (100%) rename {src => libchimara}/resource.c (100%) rename {src => libchimara}/resource.h (100%) rename {src => libchimara}/stream.c (100%) rename {src => libchimara}/stream.h (100%) rename {src => libchimara}/strio.c (100%) rename {src => libchimara}/style.c (100%) rename {src => libchimara}/style.h (100%) rename {src => libchimara}/timer.c (100%) rename {src => libchimara}/timer.h (100%) rename {src => libchimara}/window.c (100%) rename {src => libchimara}/window.h (98%) delete mode 100644 src/Makefile.am rename {src => tests}/callbacks.c (100%) rename {src => tests}/callbacks.h (99%) rename {src => tests}/chimara.glade (100%) rename {src => tests}/error.c (100%) rename {src => tests}/error.h (100%) rename {src => tests}/first.c (99%) rename {src => tests}/gridtest.c (98%) rename {src => tests}/main.c (99%) rename {src => tests}/model.c (97%) rename {src => tests}/multiwin.c (99%) rename {src => tests}/splittest.c (99%) diff --git a/Makefile.am b/Makefile.am index 76d43cd..a379a24 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Created by Anjuta -SUBDIRS = src interpreters docs po +SUBDIRS = libchimara interpreters tests docs po chimaradocdir = ${prefix}/doc/chimara dist_chimaradoc_DATA = \ diff --git a/configure.ac b/configure.ac index 6f2c579..383809f 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ # tarballname) AC_INIT([chimara], [0.1]) # Sanity check to make sure we are running Autoconf from the right directory -AC_CONFIG_SRCDIR(src/chimara-glk.c) +AC_CONFIG_SRCDIR(libchimara/chimara-glk.c) # Initialize Automake AM_INIT_AUTOMAKE([-Wall]) @@ -75,10 +75,11 @@ AC_CONFIG_FILES([ Makefile chimara.pc chimara-plugin.pc -src/Makefile +libchimara/Makefile interpreters/Makefile interpreters/frotz/Makefile interpreters/nitfol/Makefile +tests/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml diff --git a/interpreters/frotz/Makefile.am b/interpreters/frotz/Makefile.am index cd54897..34bcfa4 100644 --- a/interpreters/frotz/Makefile.am +++ b/interpreters/frotz/Makefile.am @@ -6,9 +6,6 @@ frotz_la_SOURCES = buffer.c err.c fastmem.c files.c input.c main.c math.c \ text.c variable.c glkscreen.c glkmisc.c frotz.h glkfrotz.h glkio.h setup.h frotz_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) -# TODO: Remove this later, see issue #6 -frotz_la_CFLAGS = -I../../src - frotzdocdir = $(datadir)/doc/$(PACKAGE)/frotz dist_frotzdoc_DATA = AUTHORS COPYING README TODO diff --git a/interpreters/frotz/fastmem.c b/interpreters/frotz/fastmem.c index 113c50c..fa4394b 100644 --- a/interpreters/frotz/fastmem.c +++ b/interpreters/frotz/fastmem.c @@ -28,10 +28,10 @@ #include "frotz.h" -#include "glk.h" +#include #include "glkio.h" -#include "glkstart.h" -#include "gi_blorb.h" +#include +#include extern void seed_random (int); extern void restart_screen (void); diff --git a/interpreters/frotz/files.c b/interpreters/frotz/files.c index 6ed8c33..fd22631 100644 --- a/interpreters/frotz/files.c +++ b/interpreters/frotz/files.c @@ -19,7 +19,7 @@ */ #include "frotz.h" -#include "glk.h" +#include #include "glkio.h" extern void set_more_prompts (bool); diff --git a/interpreters/frotz/glkfrotz.h b/interpreters/frotz/glkfrotz.h index 0f8ff4b..471953e 100644 --- a/interpreters/frotz/glkfrotz.h +++ b/interpreters/frotz/glkfrotz.h @@ -12,7 +12,7 @@ #include #include -#include "glk.h" +#include extern int curr_status_ht; extern int mach_status_ht; diff --git a/interpreters/frotz/main.c b/interpreters/frotz/main.c index a403c13..6ac7aa0 100644 --- a/interpreters/frotz/main.c +++ b/interpreters/frotz/main.c @@ -163,8 +163,8 @@ void z_piracy (void) * */ -#include "glk.h" -#include "glkstart.h" +#include +#include static int myargc; static char **myargv; diff --git a/interpreters/frotz/quetzal.c b/interpreters/frotz/quetzal.c index e41a57b..afc2e0e 100644 --- a/interpreters/frotz/quetzal.c +++ b/interpreters/frotz/quetzal.c @@ -19,7 +19,7 @@ */ #include "frotz.h" -#include "glk.h" +#include #include "glkio.h" #define get_c fgetc diff --git a/interpreters/nitfol/Makefile.am b/interpreters/nitfol/Makefile.am index e52ddf8..e15903e 100644 --- a/interpreters/nitfol/Makefile.am +++ b/interpreters/nitfol/Makefile.am @@ -19,8 +19,5 @@ nitfol_la_SOURCES = automap.c solve.c infix.c debug.c inform.c quetzal.c \ $(SOUND) nitfol_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) -# TODO: Remove this later, see issue #6 -nitfol_la_CFLAGS = -I../../src - nitfoldocdir = $(datadir)/doc/$(PACKAGE)/nitfol dist_nitfoldoc_DATA = ChangeLog COPYING INSTALL README diff --git a/interpreters/nitfol/README b/interpreters/nitfol/README new file mode 100644 index 0000000..e467265 --- /dev/null +++ b/interpreters/nitfol/README @@ -0,0 +1,18 @@ +This is release 0.5 of Nitfol, a z-machine interpreter using Glk for +its input and output. This release should be considered beta quality. + +Nitfol was written from scratch, with portability in mind. There's +probably some stuff in there that isn't portable, so if you find some, +let me know. It supports z1 through z8. z6 sort of works, but +doesn't display everything correctly. + +Play. Let me know if you can crash it or get it to do things an +interpreter shouldn't. + +See INSTALL for compilation/installation instructions. + +See nitfol.html or nitfol.info for full documentation. + +Evin Robertson, the author, can be reached at nitfol@my-deja.com + + diff --git a/interpreters/nitfol/blorb.c b/interpreters/nitfol/blorb.c index aedb96f..a83068b 100644 --- a/interpreters/nitfol/blorb.c +++ b/interpreters/nitfol/blorb.c @@ -1,5 +1,5 @@ #include "nitfol.h" -#include "gi_blorb.h" +#include /* Link this in only if your glk supports blorb */ diff --git a/interpreters/nitfol/gi_blorb.h b/interpreters/nitfol/gi_blorb.h deleted file mode 100644 index c71b100..0000000 --- a/interpreters/nitfol/gi_blorb.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef _GI_BLORB_H -#define _GI_BLORB_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* gi_blorb.h: Blorb library layer for Glk API. - gi_blorb version 1.1. - Designed by Andrew Plotkin - http://www.eblong.com/zarf/glk/index.html - - This file is copyright 1998-1999 by Andrew Plotkin. You may copy, - distribute, and incorporate it into your own programs, by any means - and under any conditions, as long as you do not modify it. You may - also modify this file, incorporate it into your own programs, - and distribute the modified version, as long as you retain a notice - in your program or documentation which mentions my name and the URL - shown above. -*/ - -/* Error type and error codes */ -typedef glui32 giblorb_err_t; -#define giblorb_err_None (0) -#define giblorb_err_CompileTime (1) -#define giblorb_err_Alloc (2) -#define giblorb_err_Read (3) -#define giblorb_err_NotAMap (4) -#define giblorb_err_Format (5) -#define giblorb_err_NotFound (6) - -/* Methods for loading a chunk */ -#define giblorb_method_DontLoad (0) -#define giblorb_method_Memory (1) -#define giblorb_method_FilePos (2) - -/* Four-byte constants */ - -#define giblorb_make_id(c1, c2, c3, c4) \ - (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4)) - -#define giblorb_ID_Snd (giblorb_make_id('S', 'n', 'd', ' ')) -#define giblorb_ID_Exec (giblorb_make_id('E', 'x', 'e', 'c')) -#define giblorb_ID_Pict (giblorb_make_id('P', 'i', 'c', 't')) -#define giblorb_ID_Copyright (giblorb_make_id('(', 'c', ')', ' ')) -#define giblorb_ID_AUTH (giblorb_make_id('A', 'U', 'T', 'H')) -#define giblorb_ID_ANNO (giblorb_make_id('A', 'N', 'N', 'O')) - -/* giblorb_map_t: Holds the complete description of an open Blorb - file. This type is opaque for normal interpreter use. */ -typedef struct giblorb_map_struct giblorb_map_t; - -/* giblorb_result_t: Result when you try to load a chunk. */ -typedef struct giblorb_result_struct { - glui32 chunknum; /* The chunk number (for use in - giblorb_unload_chunk(), etc.) */ - union { - void *ptr; /* A pointer to the data (if you used - giblorb_method_Memory) */ - glui32 startpos; /* The position in the file (if you - used giblorb_method_FilePos) */ - } data; - glui32 length; /* The length of the data */ - glui32 chunktype; /* The type of the chunk. */ -} giblorb_result_t; - -extern giblorb_err_t giblorb_create_map(strid_t file, - giblorb_map_t **newmap); -extern giblorb_err_t giblorb_destroy_map(giblorb_map_t *map); - -extern giblorb_err_t giblorb_load_chunk_by_type(giblorb_map_t *map, - glui32 method, giblorb_result_t *res, glui32 chunktype, - glui32 count); -extern giblorb_err_t giblorb_load_chunk_by_number(giblorb_map_t *map, - glui32 method, giblorb_result_t *res, glui32 chunknum); -extern giblorb_err_t giblorb_unload_chunk(giblorb_map_t *map, - glui32 chunknum); - -extern giblorb_err_t giblorb_load_resource(giblorb_map_t *map, - glui32 method, giblorb_result_t *res, glui32 usage, - glui32 resnum); -extern giblorb_err_t giblorb_count_resources(giblorb_map_t *map, - glui32 usage, glui32 *num, glui32 *min, glui32 *max); - -/* The following functions are part of the Glk library itself, not - the Blorb layer (whose code is in gi_blorb.c). These functions - are necessarily implemented in platform-dependent code. -*/ -extern giblorb_err_t giblorb_set_resource_map(strid_t file); - -#ifdef __cplusplus -} -#endif - -#endif /* _GI_BLORB_H */ diff --git a/interpreters/nitfol/glk.h b/interpreters/nitfol/glk.h deleted file mode 100644 index 2c5d58d..0000000 --- a/interpreters/nitfol/glk.h +++ /dev/null @@ -1,426 +0,0 @@ -#ifndef GLK_H -#define GLK_H - -/* glk.h: Header file for Glk API, version 0.7.0. - Designed by Andrew Plotkin - http://www.eblong.com/zarf/glk/index.html - - This file is copyright 1998-2004 by Andrew Plotkin. You may copy, - distribute, and incorporate it into your own programs, by any means - and under any conditions, as long as you do not modify it. You may - also modify this file, incorporate it into your own programs, - and distribute the modified version, as long as you retain a notice - in your program or documentation which mentions my name and the URL - shown above. -*/ - -/* You may have to edit the definition of glui32 to make sure it's really a - 32-bit unsigned integer type, and glsi32 to make sure it's really a - 32-bit signed integer type. If they're not, horrible things will happen. */ -#include -#if (USHORT_MAX == 4294967295) -typedef unsigned short glui32; -typedef signed short glsi32; -#elif (UINT_MAX == 4294967295) -typedef unsigned int glui32; -typedef signed int glsi32; -#elif (ULONG_MAX) == 4294967295) -typedef unsigned long glui32; -typedef signed long glsi32; -#else -#error No 32-bit integer type found. -#endif - - -/* These are the compile-time conditionals that reveal various Glk optional - modules. */ -#define GLK_MODULE_UNICODE -#define GLK_MODULE_IMAGE -#define GLK_MODULE_SOUND -#define GLK_MODULE_HYPERLINKS - -/* These types are opaque object identifiers. They're pointers to opaque - C structures, which are defined differently by each library. */ -typedef struct glk_window_struct *winid_t; -typedef struct glk_stream_struct *strid_t; -typedef struct glk_fileref_struct *frefid_t; -typedef struct glk_schannel_struct *schanid_t; - -#define gestalt_Version (0) -#define gestalt_CharInput (1) -#define gestalt_LineInput (2) -#define gestalt_CharOutput (3) -#define gestalt_CharOutput_CannotPrint (0) -#define gestalt_CharOutput_ApproxPrint (1) -#define gestalt_CharOutput_ExactPrint (2) -#define gestalt_MouseInput (4) -#define gestalt_Timer (5) -#define gestalt_Graphics (6) -#define gestalt_DrawImage (7) -#define gestalt_Sound (8) -#define gestalt_SoundVolume (9) -#define gestalt_SoundNotify (10) -#define gestalt_Hyperlinks (11) -#define gestalt_HyperlinkInput (12) -#define gestalt_SoundMusic (13) -#define gestalt_GraphicsTransparency (14) -#define gestalt_Unicode (15) - -#define evtype_None (0) -#define evtype_Timer (1) -#define evtype_CharInput (2) -#define evtype_LineInput (3) -#define evtype_MouseInput (4) -#define evtype_Arrange (5) -#define evtype_Redraw (6) -#define evtype_SoundNotify (7) -#define evtype_Hyperlink (8) - -typedef struct event_struct { - glui32 type; - winid_t win; - glui32 val1, val2; -} event_t; - -#define keycode_Unknown (0xffffffff) -#define keycode_Left (0xfffffffe) -#define keycode_Right (0xfffffffd) -#define keycode_Up (0xfffffffc) -#define keycode_Down (0xfffffffb) -#define keycode_Return (0xfffffffa) -#define keycode_Delete (0xfffffff9) -#define keycode_Escape (0xfffffff8) -#define keycode_Tab (0xfffffff7) -#define keycode_PageUp (0xfffffff6) -#define keycode_PageDown (0xfffffff5) -#define keycode_Home (0xfffffff4) -#define keycode_End (0xfffffff3) -#define keycode_Func1 (0xffffffef) -#define keycode_Func2 (0xffffffee) -#define keycode_Func3 (0xffffffed) -#define keycode_Func4 (0xffffffec) -#define keycode_Func5 (0xffffffeb) -#define keycode_Func6 (0xffffffea) -#define keycode_Func7 (0xffffffe9) -#define keycode_Func8 (0xffffffe8) -#define keycode_Func9 (0xffffffe7) -#define keycode_Func10 (0xffffffe6) -#define keycode_Func11 (0xffffffe5) -#define keycode_Func12 (0xffffffe4) -/* The last keycode is always (0x100000000 - keycode_MAXVAL) */ -#define keycode_MAXVAL (28) - -#define style_Normal (0) -#define style_Emphasized (1) -#define style_Preformatted (2) -#define style_Header (3) -#define style_Subheader (4) -#define style_Alert (5) -#define style_Note (6) -#define style_BlockQuote (7) -#define style_Input (8) -#define style_User1 (9) -#define style_User2 (10) -#define style_NUMSTYLES (11) - -typedef struct stream_result_struct { - glui32 readcount; - glui32 writecount; -} stream_result_t; - -#define wintype_AllTypes (0) -#define wintype_Pair (1) -#define wintype_Blank (2) -#define wintype_TextBuffer (3) -#define wintype_TextGrid (4) -#define wintype_Graphics (5) - -#define winmethod_Left (0x00) -#define winmethod_Right (0x01) -#define winmethod_Above (0x02) -#define winmethod_Below (0x03) -#define winmethod_DirMask (0x0f) - -#define winmethod_Fixed (0x10) -#define winmethod_Proportional (0x20) -#define winmethod_DivisionMask (0xf0) - -#define fileusage_Data (0x00) -#define fileusage_SavedGame (0x01) -#define fileusage_Transcript (0x02) -#define fileusage_InputRecord (0x03) -#define fileusage_TypeMask (0x0f) - -#define fileusage_TextMode (0x100) -#define fileusage_BinaryMode (0x000) - -#define filemode_Write (0x01) -#define filemode_Read (0x02) -#define filemode_ReadWrite (0x03) -#define filemode_WriteAppend (0x05) - -#define seekmode_Start (0) -#define seekmode_Current (1) -#define seekmode_End (2) - -#define stylehint_Indentation (0) -#define stylehint_ParaIndentation (1) -#define stylehint_Justification (2) -#define stylehint_Size (3) -#define stylehint_Weight (4) -#define stylehint_Oblique (5) -#define stylehint_Proportional (6) -#define stylehint_TextColor (7) -#define stylehint_BackColor (8) -#define stylehint_ReverseColor (9) -#define stylehint_NUMHINTS (10) - -#define stylehint_just_LeftFlush (0) -#define stylehint_just_LeftRight (1) -#define stylehint_just_Centered (2) -#define stylehint_just_RightFlush (3) - -/* glk_main() is the top-level function which you define. The Glk library - calls it. */ -extern void glk_main(void); - -extern void glk_exit(void); -extern void glk_set_interrupt_handler(void (*func)(void)); -extern void glk_tick(void); - -extern glui32 glk_gestalt(glui32 sel, glui32 val); -extern glui32 glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, - glui32 arrlen); - -extern unsigned char glk_char_to_lower(unsigned char ch); -extern unsigned char glk_char_to_upper(unsigned char ch); - -extern winid_t glk_window_get_root(void); -extern winid_t glk_window_open(winid_t split, glui32 method, glui32 size, - glui32 wintype, glui32 rock); -extern void glk_window_close(winid_t win, stream_result_t *result); -extern void glk_window_get_size(winid_t win, glui32 *widthptr, - glui32 *heightptr); -extern void glk_window_set_arrangement(winid_t win, glui32 method, - glui32 size, winid_t keywin); -extern void glk_window_get_arrangement(winid_t win, glui32 *methodptr, - glui32 *sizeptr, winid_t *keywinptr); -extern winid_t glk_window_iterate(winid_t win, glui32 *rockptr); -extern glui32 glk_window_get_rock(winid_t win); -extern glui32 glk_window_get_type(winid_t win); -extern winid_t glk_window_get_parent(winid_t win); -extern winid_t glk_window_get_sibling(winid_t win); -extern void glk_window_clear(winid_t win); -extern void glk_window_move_cursor(winid_t win, glui32 xpos, glui32 ypos); - -extern strid_t glk_window_get_stream(winid_t win); -extern void glk_window_set_echo_stream(winid_t win, strid_t str); -extern strid_t glk_window_get_echo_stream(winid_t win); -extern void glk_set_window(winid_t win); - -extern strid_t glk_stream_open_file(frefid_t fileref, glui32 fmode, - glui32 rock); -extern strid_t glk_stream_open_memory(char *buf, glui32 buflen, glui32 fmode, - glui32 rock); -extern void glk_stream_close(strid_t str, stream_result_t *result); -extern strid_t glk_stream_iterate(strid_t str, glui32 *rockptr); -extern glui32 glk_stream_get_rock(strid_t str); -extern void glk_stream_set_position(strid_t str, glsi32 pos, glui32 seekmode); -extern glui32 glk_stream_get_position(strid_t str); -extern void glk_stream_set_current(strid_t str); -extern strid_t glk_stream_get_current(void); - -extern void glk_put_char(unsigned char ch); -extern void glk_put_char_stream(strid_t str, unsigned char ch); -extern void glk_put_string(char *s); -extern void glk_put_string_stream(strid_t str, char *s); -extern void glk_put_buffer(char *buf, glui32 len); -extern void glk_put_buffer_stream(strid_t str, char *buf, glui32 len); -extern void glk_set_style(glui32 styl); -extern void glk_set_style_stream(strid_t str, glui32 styl); - -extern glsi32 glk_get_char_stream(strid_t str); -extern glui32 glk_get_line_stream(strid_t str, char *buf, glui32 len); -extern glui32 glk_get_buffer_stream(strid_t str, char *buf, glui32 len); - -extern void glk_stylehint_set(glui32 wintype, glui32 styl, glui32 hint, - glsi32 val); -extern void glk_stylehint_clear(glui32 wintype, glui32 styl, glui32 hint); -extern glui32 glk_style_distinguish(winid_t win, glui32 styl1, glui32 styl2); -extern glui32 glk_style_measure(winid_t win, glui32 styl, glui32 hint, - glui32 *result); - -extern frefid_t glk_fileref_create_temp(glui32 usage, glui32 rock); -extern frefid_t glk_fileref_create_by_name(glui32 usage, char *name, - glui32 rock); -extern frefid_t glk_fileref_create_by_prompt(glui32 usage, glui32 fmode, - glui32 rock); -extern frefid_t glk_fileref_create_from_fileref(glui32 usage, frefid_t fref, - glui32 rock); -extern void glk_fileref_destroy(frefid_t fref); -extern frefid_t glk_fileref_iterate(frefid_t fref, glui32 *rockptr); -extern glui32 glk_fileref_get_rock(frefid_t fref); -extern void glk_fileref_delete_file(frefid_t fref); -extern glui32 glk_fileref_does_file_exist(frefid_t fref); - -extern void glk_select(event_t *event); -extern void glk_select_poll(event_t *event); - -extern void glk_request_timer_events(glui32 millisecs); - -extern void glk_request_line_event(winid_t win, char *buf, glui32 maxlen, - glui32 initlen); -extern void glk_request_char_event(winid_t win); -extern void glk_request_mouse_event(winid_t win); - -extern void glk_cancel_line_event(winid_t win, event_t *event); -extern void glk_cancel_char_event(winid_t win); -extern void glk_cancel_mouse_event(winid_t win); - -#ifdef GLK_MODULE_UNICODE - -extern glui32 glk_buffer_to_lower_case_uni(glui32 *buf, glui32 len, - glui32 numchars); -extern glui32 glk_buffer_to_upper_case_uni(glui32 *buf, glui32 len, - glui32 numchars); -extern glui32 glk_buffer_to_title_case_uni(glui32 *buf, glui32 len, - glui32 numchars, glui32 lowerrest); - -extern void glk_put_char_uni(glui32 ch); -extern void glk_put_string_uni(glui32 *s); -extern void glk_put_buffer_uni(glui32 *buf, glui32 len); -extern void glk_put_char_stream_uni(strid_t str, glui32 ch); -extern void glk_put_string_stream_uni(strid_t str, glui32 *s); -extern void glk_put_buffer_stream_uni(strid_t str, glui32 *buf, glui32 len); - -extern glsi32 glk_get_char_stream_uni(strid_t str); -extern glui32 glk_get_buffer_stream_uni(strid_t str, glui32 *buf, glui32 len); -extern glui32 glk_get_line_stream_uni(strid_t str, glui32 *buf, glui32 len); - -extern strid_t glk_stream_open_file_uni(frefid_t fileref, glui32 fmode, - glui32 rock); -extern strid_t glk_stream_open_memory_uni(glui32 *buf, glui32 buflen, - glui32 fmode, glui32 rock); - -extern void glk_request_char_event_uni(winid_t win); -extern void glk_request_line_event_uni(winid_t win, glui32 *buf, - glui32 maxlen, glui32 initlen); - -#endif /* GLK_MODULE_UNICODE */ - -#ifdef GLK_MODULE_IMAGE - -#define imagealign_InlineUp (0x01) -#define imagealign_InlineDown (0x02) -#define imagealign_InlineCenter (0x03) -#define imagealign_MarginLeft (0x04) -#define imagealign_MarginRight (0x05) - -extern glui32 glk_image_draw(winid_t win, glui32 image, glsi32 val1, glsi32 val2); -extern glui32 glk_image_draw_scaled(winid_t win, glui32 image, - glsi32 val1, glsi32 val2, glui32 width, glui32 height); -extern glui32 glk_image_get_info(glui32 image, glui32 *width, glui32 *height); - -extern void glk_window_flow_break(winid_t win); - -extern void glk_window_erase_rect(winid_t win, - glsi32 left, glsi32 top, glui32 width, glui32 height); -extern void glk_window_fill_rect(winid_t win, glui32 color, - glsi32 left, glsi32 top, glui32 width, glui32 height); -extern void glk_window_set_background_color(winid_t win, glui32 color); - -#endif /* GLK_MODULE_IMAGE */ - -#ifdef GLK_MODULE_SOUND - -extern schanid_t glk_schannel_create(glui32 rock); -extern void glk_schannel_destroy(schanid_t chan); -extern schanid_t glk_schannel_iterate(schanid_t chan, glui32 *rockptr); -extern glui32 glk_schannel_get_rock(schanid_t chan); - -extern glui32 glk_schannel_play(schanid_t chan, glui32 snd); -extern glui32 glk_schannel_play_ext(schanid_t chan, glui32 snd, glui32 repeats, - glui32 notify); -extern void glk_schannel_stop(schanid_t chan); -extern void glk_schannel_set_volume(schanid_t chan, glui32 vol); - -extern void glk_sound_load_hint(glui32 snd, glui32 flag); - -#endif /* GLK_MODULE_SOUND */ - -#ifdef GLK_MODULE_HYPERLINKS - -extern void glk_set_hyperlink(glui32 linkval); -extern void glk_set_hyperlink_stream(strid_t str, glui32 linkval); -extern void glk_request_hyperlink_event(winid_t win); -extern void glk_cancel_hyperlink_event(winid_t win); - -#endif /* GLK_MODULE_HYPERLINKS */ - -/* XXX non-official Glk functions that may or may not exist */ - -#define GARGLK 1 - -extern char* garglk_fileref_get_name(frefid_t fref); - -extern void garglk_set_program_name(const char *name); -extern void garglk_set_program_info(const char *info); -extern void garglk_set_story_name(const char *name); -extern void garglk_set_config(const char *name); - -/* not implemented */ - -#define garglk_font_Roman (0) -#define garglk_font_Italic (1) -#define garglk_font_Bold (2) -#define garglk_font_BoldItalic (3) -#define garglk_font_MonoRoman (4) -#define garglk_font_MonoItalic (5) -#define garglk_font_MonoBold (6) -#define garglk_font_MonoBoldItalic (7) - -#define garglk_color_White (0) -#define garglk_color_Red (1) -#define garglk_color_Green (2) -#define garglk_color_Blue (3) -#define garglk_color_Cyan (4) -#define garglk_color_Magenta (5) -#define garglk_color_Yellow (6) -#define garglk_color_Black (7) - -extern void garglk_set_style_font(glui32 font); -extern void garglk_set_style_stream_font(strid_t str, glui32 font); -extern void garglk_set_style_color(glui32 bg, glui32 fg); -extern void garglk_set_style_stream_color(strid_t str, glui32 bg, glui32 fg); - -/* JM: functions added to support Z-machine features that aren't in the Glk standard */ - -/* garglk_set_line_terminators - amends the current line input request to include terminating - * key codes. any of the specified key codes will terminate input (without printing a newline), - * and the key code will be returned in the event record as val2. */ -extern void garglk_set_line_terminators(winid_t win, const glui32 *keycodes, glui32 numkeycodes); - -/* garglk_unput_string - removes the specified string from the end of the output buffer, if - * indeed it is there. */ -extern void garglk_unput_string(char *str); -extern void garglk_unput_string_uni(glui32 *str); - -#define zcolor_Current (0) -#define zcolor_Default (1) -#define zcolor_Black (2) -#define zcolor_Red (3) -#define zcolor_Green (4) -#define zcolor_Yellow (5) -#define zcolor_Blue (6) -#define zcolor_Magenta (7) -#define zcolor_Cyan (8) -#define zcolor_White (9) -#define zcolor_LightGrey (10) -#define zcolor_MediumGrey (11) -#define zcolor_DarkGrey (12) -#define zcolor_NUMCOLORS (13) - -extern void garglk_set_zcolors(glui32 fg, glui32 bg); -extern void garglk_set_reversevideo(glui32 reverse); - -#endif /* GLK_H */ diff --git a/interpreters/nitfol/glkstart.h b/interpreters/nitfol/glkstart.h deleted file mode 100644 index 8835064..0000000 --- a/interpreters/nitfol/glkstart.h +++ /dev/null @@ -1,70 +0,0 @@ -/* glkstart.h: Unix-specific header file for GlkTerm, CheapGlk, and XGlk - (Unix implementations of the Glk API). - Designed by Andrew Plotkin - http://www.eblong.com/zarf/glk/index.html -*/ - -/* This header defines an interface that must be used by program linked - with the various Unix Glk libraries -- at least, the three I wrote. - (I encourage anyone writing a Unix Glk library to use this interface, - but it's not part of the Glk spec.) - - Because Glk is *almost* perfectly portable, this interface *almost* - doesn't have to exist. In practice, it's small. -*/ - -#ifndef GT_START_H -#define GT_START_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* We define our own TRUE and FALSE and NULL, because ANSI - is a strange world. */ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef NULL -#define NULL 0 -#endif - -#define glkunix_arg_End (0) -#define glkunix_arg_ValueFollows (1) -#define glkunix_arg_NoValue (2) -#define glkunix_arg_ValueCanFollow (3) -#define glkunix_arg_NumberValue (4) - -typedef struct glkunix_argumentlist_struct { - char *name; - int argtype; - char *desc; -} glkunix_argumentlist_t; - -typedef struct glkunix_startup_struct { - int argc; - char **argv; -} glkunix_startup_t; - -/* The list of command-line arguments; this should be defined in your code. */ -extern glkunix_argumentlist_t glkunix_arguments[]; - -/* The external function; this should be defined in your code. */ -extern int glkunix_startup_code(glkunix_startup_t *data); - -/* Some helpful utility functions which the library makes available - to your code. Obviously, this is nonportable; so you should - only call it from glkunix_startup_code(). -*/ -extern strid_t glkunix_stream_open_pathname(char *pathname, glui32 textmode, - glui32 rock); - -#ifdef __cplusplus -} -#endif - -#endif /* GT_START_H */ - diff --git a/interpreters/nitfol/main.c b/interpreters/nitfol/main.c index ce0ceac..cbd8cde 100644 --- a/interpreters/nitfol/main.c +++ b/interpreters/nitfol/main.c @@ -19,7 +19,7 @@ */ #include "nitfol.h" -#include "gi_blorb.h" +#include static void set_zfile(strid_t file) diff --git a/interpreters/nitfol/nitfol.h b/interpreters/nitfol/nitfol.h index 319a536..7aa50ed 100644 --- a/interpreters/nitfol/nitfol.h +++ b/interpreters/nitfol/nitfol.h @@ -24,7 +24,7 @@ #include /* For time() */ #include /* for isspace, isgraph, etc. */ #include -#include "glk.h" +#include #define GLK_EOF ((glsi32) -1) #define NITFOL_MAJOR 0 @@ -328,7 +328,7 @@ typedef enum { OBJ_GET_INFO, OBJ_RECEIVE, OBJ_MOVE } watchinfo; #include "z_io.h" #include "no_snd.h" -#include "gi_blorb.h" +#include #include "no_graph.h" #include "no_blorb.h" diff --git a/interpreters/nitfol/no_blorb.c b/interpreters/nitfol/no_blorb.c index 0798545..4f1e122 100644 --- a/interpreters/nitfol/no_blorb.c +++ b/interpreters/nitfol/no_blorb.c @@ -1,5 +1,5 @@ #include "nitfol.h" -#include "gi_blorb.h" +#include /* Link this in only if your glk doesn't support blorb */ diff --git a/interpreters/nitfol/startdos.c b/interpreters/nitfol/startdos.c index 4455078..5f2372d 100644 --- a/interpreters/nitfol/startdos.c +++ b/interpreters/nitfol/startdos.c @@ -10,7 +10,7 @@ #include #include #include "nitfol.h" -#include "glkstart.h" +#include static char *game_filename = NULL; diff --git a/interpreters/nitfol/startunix.c b/interpreters/nitfol/startunix.c index 945ac3e..ba9e3fe 100644 --- a/interpreters/nitfol/startunix.c +++ b/interpreters/nitfol/startunix.c @@ -1,6 +1,6 @@ #line 228 "opt2glkc.pl" #include "nitfol.h" -#include "glkstart.h" +#include #ifdef DEBUGGING #include #endif diff --git a/src/.svnignore b/libchimara/.svnignore similarity index 100% rename from src/.svnignore rename to libchimara/.svnignore diff --git a/libchimara/Makefile.am b/libchimara/Makefile.am new file mode 100644 index 0000000..f173bca --- /dev/null +++ b/libchimara/Makefile.am @@ -0,0 +1,34 @@ +## Process this file with automake to produce Makefile.in + +AM_CFLAGS = -Wall + +lib_LTLIBRARIES = libchimara.la + +libchimara_la_SOURCES = \ + abort.c abort.h \ + case.c \ + charset.c charset.h \ + chimara-glk.c chimara-glk.h chimara-glk-private.h \ + event.c event.h \ + fileref.c fileref.h \ + gestalt.c \ + glk.c glk.h \ + magic.c magic.h \ + input.c input.h \ + stream.c stream.h \ + strio.c \ + timer.c timer.h \ + window.c window.h \ + gi_blorb.c gi_blorb.h \ + resource.c resource.h \ + style.c style.h \ + glkstart.h +libchimara_la_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"Chimara\" +libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS) +libchimara_la_LIBADD = @CHIMARA_LIBS@ +libchimara_la_LDFLAGS = -no-undefined -export-symbols-regex "^(chimara_)?glk_" +libchimara_includedir = $(includedir)/chimara/chimara +libchimara_include_HEADERS = chimara-glk.h + +EXTRA_DIST = doc.c diff --git a/src/abort.c b/libchimara/abort.c similarity index 100% rename from src/abort.c rename to libchimara/abort.c diff --git a/src/abort.h b/libchimara/abort.h similarity index 100% rename from src/abort.h rename to libchimara/abort.h diff --git a/src/case.c b/libchimara/case.c similarity index 100% rename from src/case.c rename to libchimara/case.c diff --git a/src/charset.c b/libchimara/charset.c similarity index 100% rename from src/charset.c rename to libchimara/charset.c diff --git a/src/charset.h b/libchimara/charset.h similarity index 100% rename from src/charset.h rename to libchimara/charset.h diff --git a/src/chimara-glk-private.h b/libchimara/chimara-glk-private.h similarity index 100% rename from src/chimara-glk-private.h rename to libchimara/chimara-glk-private.h diff --git a/src/chimara-glk.c b/libchimara/chimara-glk.c similarity index 100% rename from src/chimara-glk.c rename to libchimara/chimara-glk.c diff --git a/src/chimara-glk.h b/libchimara/chimara-glk.h similarity index 100% rename from src/chimara-glk.h rename to libchimara/chimara-glk.h diff --git a/src/doc.c b/libchimara/doc.c similarity index 100% rename from src/doc.c rename to libchimara/doc.c diff --git a/src/event.c b/libchimara/event.c similarity index 100% rename from src/event.c rename to libchimara/event.c diff --git a/src/event.h b/libchimara/event.h similarity index 100% rename from src/event.h rename to libchimara/event.h diff --git a/src/fileref.c b/libchimara/fileref.c similarity index 100% rename from src/fileref.c rename to libchimara/fileref.c diff --git a/src/fileref.h b/libchimara/fileref.h similarity index 100% rename from src/fileref.h rename to libchimara/fileref.h diff --git a/src/gestalt.c b/libchimara/gestalt.c similarity index 100% rename from src/gestalt.c rename to libchimara/gestalt.c diff --git a/src/gi_blorb.c b/libchimara/gi_blorb.c similarity index 100% rename from src/gi_blorb.c rename to libchimara/gi_blorb.c diff --git a/src/gi_blorb.h b/libchimara/gi_blorb.h similarity index 100% rename from src/gi_blorb.h rename to libchimara/gi_blorb.h diff --git a/src/glk.c b/libchimara/glk.c similarity index 100% rename from src/glk.c rename to libchimara/glk.c diff --git a/src/glk.h b/libchimara/glk.h similarity index 100% rename from src/glk.h rename to libchimara/glk.h diff --git a/src/glkstart.c b/libchimara/glkstart.c similarity index 100% rename from src/glkstart.c rename to libchimara/glkstart.c diff --git a/src/glkstart.h b/libchimara/glkstart.h similarity index 100% rename from src/glkstart.h rename to libchimara/glkstart.h diff --git a/src/input.c b/libchimara/input.c similarity index 100% rename from src/input.c rename to libchimara/input.c diff --git a/src/input.h b/libchimara/input.h similarity index 100% rename from src/input.h rename to libchimara/input.h diff --git a/src/magic.c b/libchimara/magic.c similarity index 100% rename from src/magic.c rename to libchimara/magic.c diff --git a/src/magic.h b/libchimara/magic.h similarity index 100% rename from src/magic.h rename to libchimara/magic.h diff --git a/src/resource.c b/libchimara/resource.c similarity index 100% rename from src/resource.c rename to libchimara/resource.c diff --git a/src/resource.h b/libchimara/resource.h similarity index 100% rename from src/resource.h rename to libchimara/resource.h diff --git a/src/stream.c b/libchimara/stream.c similarity index 100% rename from src/stream.c rename to libchimara/stream.c diff --git a/src/stream.h b/libchimara/stream.h similarity index 100% rename from src/stream.h rename to libchimara/stream.h diff --git a/src/strio.c b/libchimara/strio.c similarity index 100% rename from src/strio.c rename to libchimara/strio.c diff --git a/src/style.c b/libchimara/style.c similarity index 100% rename from src/style.c rename to libchimara/style.c diff --git a/src/style.h b/libchimara/style.h similarity index 100% rename from src/style.h rename to libchimara/style.h diff --git a/src/timer.c b/libchimara/timer.c similarity index 100% rename from src/timer.c rename to libchimara/timer.c diff --git a/src/timer.h b/libchimara/timer.h similarity index 100% rename from src/timer.h rename to libchimara/timer.h diff --git a/src/window.c b/libchimara/window.c similarity index 100% rename from src/window.c rename to libchimara/window.c diff --git a/src/window.h b/libchimara/window.h similarity index 98% rename from src/window.h rename to libchimara/window.h index b3b824a..1a0b2e9 100644 --- a/src/window.h +++ b/libchimara/window.h @@ -6,7 +6,6 @@ #include "stream.h" #include "error.h" -#include "callbacks.h" #include "input.h" #include "style.h" diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 4a2806e..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -## Process this file with automake to produce Makefile.in - -AM_CFLAGS = -Wall - -data_DATA = chimara.ui - -noinst_PROGRAMS = test-chimara - -test_chimara_SOURCES = main.c callbacks.c callbacks.h error.c error.h -test_chimara_CPPFLAGS = \ - -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ - -DPACKAGE_DATA_DIR=\""$(datadir)"\" -test_chimara_CFLAGS = @TEST_CFLAGS@ $(AM_CFLAGS) -test_chimara_LDADD = @TEST_LIBS@ -lchimara - -lib_LTLIBRARIES = libchimara.la - -libchimara_la_SOURCES = \ - abort.c abort.h \ - case.c \ - charset.c charset.h \ - chimara-glk.c chimara-glk.h chimara-glk-private.h \ - event.c event.h \ - fileref.c fileref.h \ - gestalt.c \ - glk.c glk.h \ - magic.c magic.h \ - input.c input.h \ - stream.c stream.h \ - strio.c \ - timer.c timer.h \ - window.c window.h \ - gi_blorb.c gi_blorb.h \ - resource.c resource.h \ - style.c style.h \ - glkstart.h -libchimara_la_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"Chimara\" -libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS) -libchimara_la_LIBADD = @CHIMARA_LIBS@ -libchimara_la_LDFLAGS = -no-undefined -export-symbols-regex "^(chimara_)?glk_" -libchimara_includedir = $(includedir)/chimara/chimara -libchimara_include_HEADERS = chimara-glk.h - -pkglib_LTLIBRARIES = first.la model.la gridtest.la splittest.la multiwin.la -PLUGIN_LIBTOOL_FLAGS=-module -avoid-version -export-symbols-regex "^glk_main$$" - -first_la_SOURCES = first.c -first_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) - -model_la_SOURCES = model.c -model_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) - -gridtest_la_SOURCES = gridtest.c -gridtest_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) - -splittest_la_SOURCES = splittest.c -splittest_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) - -multiwin_la_SOURCES = multiwin.c -multiwin_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) - -CLEANFILES = chimara.ui - -chimara.ui: chimara.glade - gtk-builder-convert $< $@ - -EXTRA_DIST = doc.c chimara.glade diff --git a/src/callbacks.c b/tests/callbacks.c similarity index 100% rename from src/callbacks.c rename to tests/callbacks.c diff --git a/src/callbacks.h b/tests/callbacks.h similarity index 99% rename from src/callbacks.h rename to tests/callbacks.h index 313ca00..f14403c 100644 --- a/src/callbacks.h +++ b/tests/callbacks.h @@ -32,7 +32,6 @@ #include #include "error.h" -#include "event.h" void on_save_tool_button_clicked(GtkToolButton *toolbutton, gpointer user_data); gboolean on_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data); diff --git a/src/chimara.glade b/tests/chimara.glade similarity index 100% rename from src/chimara.glade rename to tests/chimara.glade diff --git a/src/error.c b/tests/error.c similarity index 100% rename from src/error.c rename to tests/error.c diff --git a/src/error.h b/tests/error.h similarity index 100% rename from src/error.h rename to tests/error.h diff --git a/src/first.c b/tests/first.c similarity index 99% rename from src/first.c rename to tests/first.c index fdb97a4..0189105 100644 --- a/src/first.c +++ b/tests/first.c @@ -1,4 +1,4 @@ -#include "glk.h" +#include /* model.c: Model program for Glk API, version 0.5. Designed by Andrew Plotkin diff --git a/src/gridtest.c b/tests/gridtest.c similarity index 98% rename from src/gridtest.c rename to tests/gridtest.c index cec6004..d8922a1 100644 --- a/src/gridtest.c +++ b/tests/gridtest.c @@ -2,7 +2,7 @@ #include #include #include -#include "glk.h" +#include void glk_main(void) { diff --git a/src/main.c b/tests/main.c similarity index 99% rename from src/main.c rename to tests/main.c index c34e4c5..605a576 100644 --- a/src/main.c +++ b/tests/main.c @@ -42,7 +42,7 @@ #include "callbacks.h" #include "error.h" -#include "chimara-glk.h" +#include /* Global pointers to widgets */ GtkBuilder *builder = NULL; diff --git a/src/model.c b/tests/model.c similarity index 97% rename from src/model.c rename to tests/model.c index 4cf2609..b7831df 100644 --- a/src/model.c +++ b/tests/model.c @@ -1,5 +1,5 @@ -#include "stdio.h" -#include "glk.h" +#include +#include static winid_t mainwin = NULL; diff --git a/src/multiwin.c b/tests/multiwin.c similarity index 99% rename from src/multiwin.c rename to tests/multiwin.c index 261d7fb..6aa7e1c 100644 --- a/src/multiwin.c +++ b/tests/multiwin.c @@ -1,4 +1,4 @@ -#include "glk.h" +#include /* multiwin.c: Sample program for Glk API, version 0.5. Designed by Andrew Plotkin diff --git a/src/splittest.c b/tests/splittest.c similarity index 99% rename from src/splittest.c rename to tests/splittest.c index 7448437..a4af95a 100644 --- a/src/splittest.c +++ b/tests/splittest.c @@ -1,6 +1,6 @@ #include #include -#include "glk.h" +#include #define SPACE_FACTOR 1.8 -- 2.30.2