can be straightforwardly dealt with by naming the structure, e.g., we have such declarations as
struct Group {
Control;
,,,,
};
and
struct Box {
Control;
....
};
where 'Control' is a previously defined aggregate, so to make
this legal for non-Plan9 compilers
struct Group {
Control c;
...
};
Group *g;
....g->event => g->c.event
would seem to be the correct procedure, except there are some
cases like this
void
_ctladdgroup(Control *c, Control *q){
Group *g = (Group*)c;
...
where'_ctladdgroup' is called with a real Control* struct as
argument one, not a cast, and then tries to cast this to a
Group*, and then references elements of the Group struct:
g->kids = realloc(...);
This just will not work, so can someone explain what is going on
with this code, and how it compiles, and runs, under Plan9?