Debian Codegraph @

terps/alan3/glkstart.h

raw symbols SCIP
1 /* glkstart.h: Unix-specific header file for GlkTerm, CheapGlk, and XGlk
2 (Unix implementations of the Glk API).
3 Designed by Andrew Plotkin <[email protected]>
4 http://www.eblong.com/zarf/glk/index.html
5 */
6
7 /* This header defines an interface that must be used by program linked
8 with the various Unix Glk libraries -- at least, the three I wrote.
9 (I encourage anyone writing a Unix Glk library to use this interface,
10 but it's not part of the Glk spec.)
11
12 Because Glk is *almost* perfectly portable, this interface *almost*
13 doesn't have to exist. In practice, it's small.
14 */
15
16 #ifndef GLK_START_H
17 #define GLK_START_H
18
19 #ifndef NULL
20 #define NULL 0
21 #endif
22
23 #define glkunix_arg_End (0)
24 #define glkunix_arg_ValueFollows (1)
25 #define glkunix_arg_NoValue (2)
26 #define glkunix_arg_ValueCanFollow (3)
27 #define glkunix_arg_NumberValue (4)
28
29 typedef struct glkunix_argumentlist_struct {
30 char *name;
31 int argtype;
32 char *desc;
33 } glkunix_argumentlist_t;
34
35 typedef struct glkunix_startup_struct {
36 int argc;
37 char **argv;
38 } glkunix_startup_t;
39
40 /* The list of command-line arguments; this should be defined in your code. */
41 extern glkunix_argumentlist_t glkunix_arguments[];
42
43 /* The external function; this should be defined in your code. */
44 extern int glkunix_startup_code(glkunix_startup_t *data);
45
46 /* Some helpful utility functions which the library makes available
47 to your code. Obviously, this is nonportable; so you should
48 only call it from glkunix_startup_code().
49 */
50 extern strid_t glkunix_stream_open_pathname(char *pathname, glui32 textmode,
51 glui32 rock);
52
53 #endif