Commit 9595df80 authored by dcw's avatar dcw
Browse files

changed fieldnames from plain "X" to be "{Shape}X" to make them unique..

parent e7828799
......@@ -35,7 +35,7 @@ static void deconsproc_body( decln , shape );
static void printproc_header( char * );
static void printproc_body( decln );
static void print_using_case( char * , char * , shapelist );
static void print_param( param );
static void print_param( char * , param );
static void print_all_params( char * , shape );
static void write_bool( void );
static char * lookup_type( char * );
......@@ -360,7 +360,8 @@ static void variantfields( d ) decln d;
indent();
for( p = s->params; p != NULL; p=p->next )
{
line( "%s\t: %s;", p->name, lookup_type(p->type) );
line( "%s%s\t: %s;", s->name, p->name,
lookup_type(p->type) );
}
outdent();
}
......@@ -378,7 +379,8 @@ static void normalfields( d ) decln d;
{
for( p = s->params; p != NULL; p=p->next )
{
line( "%s\t: %s;", p->name, lookup_type(p->type) );
line( "%s%s\t: %s;", s->name, p->name,
lookup_type(p->type) );
}
}
}
......@@ -435,7 +437,7 @@ static void consproc_body( d, s ) decln d; shape s;
}
for( p=s->params; p != NULL; p=p->next )
{
line( "new^.%s\t:= %s;", p->name, p->name );
line( "new^.%s%s\t:= %s;", s->name, p->name, p->name );
}
line( "RETURN new;" );
}
......@@ -529,7 +531,7 @@ static void deconsproc_body( d, s ) decln d; shape s;
for( p=s->params; p != NULL; p=p->next )
{
line( "%s\t:= this^.%s;", p->name, p->name );
line( "%s\t:= this^.%s%s;", p->name, s->name, p->name );
}
outdent();
......@@ -606,9 +608,10 @@ static void print_using_case( tag, dname, s ) char *tag, *dname; shapelist s;
}
static void print_param( p ) param p;
static void print_param( sname, p ) char *sname; param p;
{
line( "%s( f, this^.%s );", lookup_print_proc(p->type), p->name );
line( "%s( f, this^.%s%s );",
lookup_print_proc(p->type), sname, p->name );
}
......@@ -626,7 +629,7 @@ static void print_all_params( dname, s ) char *dname; shape s;
line( "WriteChar( f, '(' );" );
for( p = s->params; p != NULL; p = p->next )
{
print_param( p );
print_param( s->name, p );
}
line( "WriteChar( f, ')' );" );
}
......@@ -648,7 +651,7 @@ static void print_all_params( dname, s ) char *dname; shape s;
ASSERT( p != NULL,
("m2datadec: bad printitem number in shape %s of type %s\n", s->name, dname));
}
print_param( p );
print_param( s->name, p );
}
}
}
......
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