Commit aa4d81c2 authored by dcw's avatar dcw
Browse files

code generated now includes new dunc style of list allocation (NEW_).

parent bf6b5ee5
......@@ -102,7 +102,8 @@ static void data_decls( decs ) declnlist decs;
{
if( d->Struct )
{
line( "typedef struct %s_str *%s;", d->name, d->name );
line("struct %s;", d->name);
line("typedef struct %s *%s;", d->name, d->name );
} else
{
line( "typedef int %s;", d->name );
......@@ -251,11 +252,11 @@ static void cons_fn_body( d, name, s ) declnlist d; char *name; shapelist s;
paramlist p;
ASSERT( d->Struct,
("error: cons_func_body called but d->Struct is FALSE!\n") );
("error: cons_fn_body called but d->Struct is FALSE!\n") );
line( "{" );
indent();
line( "%s\tnew;\n", name );
line( "new = NEW( struct %s_str );", name );
line( "new = NEW_(%s);", name );
if( d->TagField )
{
line( "new->tag = %s_%s_tag;", name, s->name );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment