Check-in Lasker-2.2.3 tar ball from samba.org
[capablanca.git] / lasker-2.2.3 / src / parsers / README
1 genstruct is a system for marshalling/unmarshalling C structures. It
2 has a number of unusual features:
3
4 - can handle a very wide range of C constructs
5 - produces a human-readable marshalled format
6 - can handle significant changes in the structures between marshalling
7   and unmarshalling
8 - works directly from C header files
9
10 To see how to use it please take a look at test.c and test.h. I'm
11 afraid that the only documentation at the moment is these examples.
12
13 Limitations
14 -----------
15
16 genstruct cannot handle some types of C structures. In particular it
17 cannot handle structures where a single pointer is used more than once
18 (for example in doubly linked lists). Once I add reference counting
19 this should be fixed.
20
21 A second problem is that genstruct works on the C headers before they
22 have been through the C pre-processor. This means that #ifdefs within
23 structures will screw things up badly.
24
25 Finally, genstruct only handles structure definitions if they are
26 formatted in a certain way. For example this will work:
27
28 GENSTRUCT struct foo {
29           char *s;
30           int x;
31 };
32
33 but this won't:
34
35 GENSTRUCT typedef struct {
36           char *s;
37           int x;
38 } foo;
39
40 This may be fixed in a future release.
41
42
43  --
44  Andrew Tridgell
45  genstruct@tridgell.net