1
/*$Id: //depot/prj/geas/master/code/geasglkterm.c#4 $
4
Bridge file between Geas and GlkTerm. Only needed if using GlkTerm.
6
Copyright (C) 2006 David Jones. Distribution or modification in any
9
Unix specific (see the call to close()).
20
const char *storyfilename = NULL;
21
int use_inputwindow = 0;
23
glkunix_argumentlist_t glkunix_arguments[] = {
24
{ "-w", glkunix_arg_NoValue, "-w: Use a separate input window."},
25
{ "", glkunix_arg_ValueFollows, "filename: The game file to load."},
26
{ NULL, glkunix_arg_End, NULL }
30
glkunix_startup_code(glkunix_startup_t *data)
34
if (data->argc > 1 && strcmp (data->argv[i], "-w") == 0) {
40
garglk_set_program_name("Geas 0.4");
41
garglk_set_program_info(
42
"Geas 0.4 by Mark Tilford and David Jones.\n"
43
"Additional Glk support by Simon Baldwin.");
46
if (i == data->argc - 1) {
47
storyfilename = data->argv[i];
49
char *s = strrchr(storyfilename, '/');
50
if (!s) s = strrchr(storyfilename, '\\');
51
garglk_set_story_name(s ? s + 1 : storyfilename);