~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to garglk/glkstart.h

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
    This file is copyright 1998-2004 by Andrew Plotkin. You may copy,
 
7
    distribute, and incorporate it into your own programs, by any means
 
8
    and under any conditions, as long as you do not modify it. You may
 
9
    also modify this file, incorporate it into your own programs,
 
10
    and distribute the modified version, as long as you retain a notice
 
11
    in your program or documentation which mentions my name and the URL
 
12
    shown above.
 
13
*/
 
14
 
 
15
/* This header defines an interface that must be used by program linked
 
16
    with the various Unix Glk libraries -- at least, the three I wrote.
 
17
    (I encourage anyone writing a Unix Glk library to use this interface,
 
18
    but it's not part of the Glk spec.)
 
19
    
 
20
    Because Glk is *almost* perfectly portable, this interface *almost*
 
21
    doesn't have to exist. In practice, it's small.
 
22
*/
 
23
 
 
24
#ifndef GT_START_H
 
25
#define GT_START_H
 
26
 
 
27
/* We define our own TRUE and FALSE and NULL, because ANSI
 
28
    is a strange world. */
 
29
#ifndef TRUE
 
30
#define TRUE 1
 
31
#endif
 
32
#ifndef FALSE
 
33
#define FALSE 0
 
34
#endif
 
35
#ifndef NULL
 
36
#define NULL 0
 
37
#endif
 
38
 
 
39
#define glkunix_arg_End (0)
 
40
#define glkunix_arg_ValueFollows (1)
 
41
#define glkunix_arg_NoValue (2)
 
42
#define glkunix_arg_ValueCanFollow (3)
 
43
#define glkunix_arg_NumberValue (4)
 
44
 
 
45
typedef struct glkunix_argumentlist_struct {
 
46
    char *name;
 
47
    int argtype;
 
48
    char *desc;
 
49
} glkunix_argumentlist_t;
 
50
 
 
51
typedef struct glkunix_startup_struct {
 
52
    int argc;
 
53
    char **argv;
 
54
} glkunix_startup_t;
 
55
 
 
56
extern glkunix_argumentlist_t glkunix_arguments[];
 
57
 
 
58
extern int glkunix_startup_code(glkunix_startup_t *data);
 
59
 
 
60
extern void glkunix_set_base_file(char *filename);
 
61
extern strid_t glkunix_stream_open_pathname(char *pathname, glui32 textmode, 
 
62
    glui32 rock);
 
63
 
 
64
#endif /* GT_START_H */
 
65