diff --git a/src/c02.c b/src/c02.c index a6d96b6..2bfd796 100644 --- a/src/c02.c +++ b/src/c02.c @@ -172,6 +172,7 @@ int main(int argc, char *argv[]) { compile(); + logstc(); logcon(); clssrc(); //Close Source File diff --git a/src/include.c b/src/include.c index 2b7cdaf..09fc378 100644 --- a/src/include.c +++ b/src/include.c @@ -230,9 +230,8 @@ void pincfl(void) { /* Print Constant Table to Log File */ void logcon(void) { int i; - fprintf(logfil, "\n%-31s %5s\n", "Definition", "Value"); - for (i=0; i 256) ERROR("Structure Size %d Exceeds Limit of 256 bytes.\n", stclen, EXIT_FAILURE); - stcsiz[stccnt] = stclen; - DEBUG("Set struct size to %d\n", stclen); - stccnt++; - DEBUG("Struct Declaration Completed\n", 0) + if (strct.size > 256) ERROR("Structure Size %d Exceeds Limit of 256 bytes.\n", strct.size, EXIT_FAILURE); + DEBUG("Adding struct with size %d\n", strct.size) DETAIL("at index %d\n", stccnt); + strcts[stccnt++] = strct; +} + +/* Print Struc Tables to Log File */ +void logstc(void) { + fprintf(logfil, "\n%-8s %5s\n", "Struct", "Size"); + for (stcidx=0; stcidx