1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-25 06:31:25 +00:00

Refactor: combined function logvar() into vartbl()

This commit is contained in:
Curtis F Kaylor 2018-02-08 22:45:20 -05:00
parent 1ef4cfc25d
commit c17904a752
4 changed files with 2 additions and 14 deletions

1
c02.c
View File

@ -175,7 +175,6 @@ int main(int argc, char *argv[])
compile();
logdef();
logvar();
clssrc(); //Close Source File
clsout(); //Close Output File

BIN
c02.exe

Binary file not shown.

BIN
c02.tag

Binary file not shown.

15
vars.c
View File

@ -302,8 +302,10 @@ void vartbl()
{
int i;
DEBUG("Writing Variable Table", 0);
fprintf(logfil, "\n%-31s %s %s %s\n", "Variable", "Type", "Size", "Data");
dlen = 0;
for (i=0; i<varcnt; i++) {
fprintf(logfil, "%-31s %4d %4s %1d-%d\n", varnam[i], vartyp[i], varsiz[i], dattyp[i], datlen[i]);
strcpy(lblasm, varnam[i]);
DEBUG("Set Label to '%s'\n", lblasm);
if (strcmp(varsiz[i], "*") == 0)
@ -325,16 +327,3 @@ void vartbl()
}
vrwrtn = TRUE;
}
/* Print Variable Table to Log File */
void logvar()
{
int i;
fprintf(logfil, "\n%-31s %s %s %s\n", "Variable", "Type", "Size", "Data");
for (i=0; i<varcnt; i++)
{
fprintf(logfil, "%-31s %4d %4s %1d-%d\n", varnam[i], vartyp[i], varsiz[i], dattyp[i], datlen[i]);
}
}