Commit cf8b7bc8 authored by dcw's avatar dcw

Defines -> ManyShapes; and added cardinal predef type

parent a737e595
......@@ -94,9 +94,9 @@ void make_declns( exports, globals, d, basename ) declnlist d; char *exports, *g
#define indent() numtabs++
#define outdent() numtabs--
#define nl() fputc( '\n', outfile )
#define nl() fputc( '\n', outfile )
#define outchar(c) fputc( c, outfile )
#define usefile(f) outfile = f, numtabs = 0
#define usefile(f) outfile = f, numtabs = 0
/*VARARGS*/
......@@ -178,6 +178,7 @@ static void defn_declns( exports, modulename, decs ) char *exports, *modulename;
{
defn_onetype( d );
}
if( *exportptr != '\0' )
{
nl();
......@@ -207,7 +208,7 @@ static void defn_onetype( d ) decln d;
}
nl();
if( d->Defines )
if( d->ManyShapes )
{
line( "(* Kind of %s *)", d->name );
line( "TYPE" );
......@@ -276,7 +277,7 @@ static void impln_declns( globals, modulename, decs ) char *globals, *modulename
line( "FROM FIO IMPORT" );
indent();
line( "File, WriteString, WriteChar, WriteInteger," );
line( "WriteReal, WriteLine, WriteLn;" );
line( "WriteCardinal, WriteReal, WriteLine, WriteLn;" );
nl();
outdent();
line( "FROM Storage IMPORT ALLOCATE;" );
......@@ -318,6 +319,7 @@ static void impln_declns( globals, modulename, decs ) char *globals, *modulename
impln_onetype( d );
}
write_bool();
if( *globalptr != '\0' )
{
nl();
......@@ -372,7 +374,7 @@ static void impln_onetype( d ) decln d;
consproc_body( d, s );
}
if( d->Defines )
if( d->ManyShapes )
{
deconskind_body( d );
}
......@@ -836,6 +838,10 @@ static struct typelookup lookup[] = {
"Int", "INTEGER", "WriteInteger",
"INT", "INTEGER", "WriteInteger",
"INTEGER", "INTEGER", "WriteInteger",
"card", "CARDINAL", "WriteCardinal",
"Card", "CARDINAL", "WriteCardinal",
"CARD", "CARDINAL", "WriteCardinal",
"CARDINAL", "CARDINAL", "WriteCardinal",
"string", "string", "WriteString",
"String", "String", "WriteString",
"real", "REAL", "WriteReal",
......
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