git: Line endings of README.txt
[projects/chimara/chimara.git] / libchimara / glkstart.h
1 /* glkstart.h: Unix-specific header file for GlkTerm, CheapGlk, and XGlk
2         (Unix implementations of the Glk API).
3     Designed by Andrew Plotkin <erkyrath@eblong.com>
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 GT_START_H
17 #define GT_START_H
18
19 /* We define our own TRUE and FALSE and NULL, because ANSI
20     is a strange world. */
21 #ifndef TRUE
22 #define TRUE 1
23 #endif
24 #ifndef FALSE
25 #define FALSE 0
26 #endif
27 #ifndef NULL
28 #define NULL 0
29 #endif
30
31 #define glkunix_arg_End (0)
32 #define glkunix_arg_ValueFollows (1)
33 #define glkunix_arg_NoValue (2)
34 #define glkunix_arg_ValueCanFollow (3)
35 #define glkunix_arg_NumberValue (4)
36
37 typedef struct glkunix_argumentlist_struct {
38     char *name;
39     int argtype;
40     char *desc;
41 } glkunix_argumentlist_t;
42
43 typedef struct glkunix_startup_struct {
44     int argc;
45     char **argv;
46 } glkunix_startup_t;
47
48 extern glkunix_argumentlist_t glkunix_arguments[];
49
50 extern int glkunix_startup_code(glkunix_startup_t *data);
51
52 extern void glkunix_set_base_file(char *filename);
53 extern strid_t glkunix_stream_open_pathname_gen(char *pathname,
54     glui32 writemode, glui32 textmode, glui32 rock);
55 extern strid_t glkunix_stream_open_pathname(char *pathname, glui32 textmode, 
56     glui32 rock);
57
58 #endif /* GT_START_H */
59