1 diff -P'aurx.*' git-1.2.4/gestalt.c git-chimara/gestalt.c
2 --- git-1.2.4/gestalt.c 2009-04-03 00:54:50.000000000 +0200
3 +++ git-chimara/gestalt.c 2009-10-07 23:43:28.000000000 +0200
7 case GESTALT_SPEC_VERSION:
11 case GESTALT_TERP_VERSION:
12 return GIT_VERSION_NUM;
13 Only in git-1.2.4: git_mac.c
14 diff -P'aurx.*' git-1.2.4/git_unix.c git-chimara/git_unix.c
15 --- git-1.2.4/git_unix.c 2009-04-03 00:54:50.000000000 +0200
16 +++ git-chimara/git_unix.c 2009-10-07 23:59:58.000000000 +0200
18 #define CACHE_SIZE (256 * 1024L)
19 #define UNDO_SIZE (512 * 1024L)
23 +#ifdef CHIMARA_EXTENSIONS
25 +void fatalError (const char * s)
30 + win = glk_window_open(0, 0, 0, wintype_TextBuffer, 0);
31 + glk_set_window(win);
33 + /* pray that this goes somewhere reasonable... */
34 + glk_put_string("\n*** fatal error: ");
35 + glk_put_string((char*)s);
36 + glk_put_string(" ***\n");
42 void fatalError (const char * s)
44 fprintf (stderr, "*** fatal error: %s ***\n", s);
48 +#endif /* CHIMARA_EXTENSIONS */
51 // Fast loader that uses some fancy Unix features.
53 const char * gFilename = 0;
54 +char * gStartupError = 0;
56 int glkunix_startup_code(glkunix_startup_t *data)
60 - printf ("usage: git gamefile.ulx\n");
62 + gStartupError = "No file given";
65 gFilename = data->argv[1];
74 + fatalError(gStartupError);
76 file = open (gFilename, O_RDONLY);
82 if (info.st_size < 256)
84 - fprintf (stderr, "This is too small to be a glulx file.\n");
87 + fatalError("This is too small to be a glulx file.");
89 ptr = mmap (NULL, info.st_size, PROT_READ, MAP_PRIVATE, file, 0);
90 if (ptr == MAP_FAILED)
95 git (ptr, info.st_size, CACHE_SIZE, UNDO_SIZE);
96 munmap ((void*) ptr, info.st_size);
102 + sprintf(errmsg, "git: %s", strerror(errno));
103 + fatalError(errmsg);
107 // Generic loader that should work anywhere.
110 +char * gStartupError = 0;
112 int glkunix_startup_code(glkunix_startup_t *data)
116 - printf ("usage: git gamefile.ulx\n");
118 + gStartupError = "No file given";
121 gStream = glkunix_stream_open_pathname ((char*) data->argv[1], 0, 0);
128 + fatalError(gStartupError);
131 fatalError ("could not open game file");
135 gitWithStream (gStream, CACHE_SIZE, UNDO_SIZE);
138 Only in git-1.2.4: git_windows.c
139 Only in git-1.2.4: Makefile
140 diff -P'aurx.*' git-1.2.4/Makefile.am git-chimara/Makefile.am
141 --- git-1.2.4/Makefile.am 1970-01-01 01:00:00.000000000 +0100
142 +++ git-chimara/Makefile.am 2009-10-07 23:59:34.000000000 +0200
144 +PLUGIN_LIBTOOL_FLAGS=-module -avoid-version -export-symbols-regex "^glk"
146 +# Automatically generate version.h
151 + echo "// Automatically generated file -- do not edit!" > version.h
152 + echo "#define GIT_MAJOR" $(MAJOR) >> version.h
153 + echo "#define GIT_MINOR" $(MINOR) >> version.h
154 + echo "#define GIT_PATCH" $(PATCH) >> version.h
156 +pkglib_LTLIBRARIES = git.la
157 +BUILT_SOURCES = version.h
158 +git_la_SOURCES = version.h git.h config.h compiler.h memory.h opcodes.h \
159 + labels.inc compiler.c gestalt.c git.c git_unix.c glkop.c heap.c memory.c \
160 + opcodes.c operands.c peephole.c savefile.c saveundo.c search.c terp.c \
162 +git_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libchimara
163 +git_la_CFLAGS = -DCHIMARA_EXTENSIONS -DUSE_INLINE $(AM_CFLAGS)
164 +git_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
166 +gitdocdir = $(datadir)/doc/$(PACKAGE)/git
167 +dist_gitdoc_DATA = README.txt
169 +CLEANFILES = test/*.tmp
171 +#TESTS = test/test.sh \
172 +# test/Alabaster.gblorb test/Alabaster.walk test/Alabaster.golden
177 +# Memory mapping (-DUSE_MMAP) doesn't seem to work... FIXME
179 +# Best settings for GCC 2.95. This generates faster code than
180 +# GCC 3, so you should use this setup if possible.
182 +#OPTIONS = -DUSE_DIRECT_THREADING -DUSE_MMAP -DUSE_INLINE
184 +# Best settings for GCC 3. The optimiser in this version of GCC
185 +# is somewhat broken, so we can't use USE_DIRECT_THREADING.
187 +#OPTIONS = -DUSE_MMAP -DUSE_INLINE
189 +# Mac OS X (PowerPC) settings.
190 +#CC = gcc2 -Wall -O3 -no-cpp-precomp
191 +#OPTIONS = -DUSE_DIRECT_THREADING -DUSE_BIG_ENDIAN_UNALIGNED -DUSE_MMAP -DUSE_INLINE
192 Only in git-1.2.4: Makefile.win
193 Only in git-1.2.4: win