1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-04-05 03:37:43 +00:00

Give output filename as STDOUT if -S flag

This commit is contained in:
David Schmenk 2023-02-02 12:02:54 -06:00
parent 9cb7d29bfa
commit 1d3de982d6

View File

@ -60,8 +60,16 @@ int main(int argc, char **argv)
j--;
}
asmfile[j+1] = 'a';
while (j && asmfile[j-1] != '/')
j--;
k = 1;
while (asmfile[j] != '.')
modfile[k++] = toupper(asmfile[j++]);
modfile[k] = '\0';
modfile[0] = k - 1;
if (outflags & STREAM)
{
strcpy(asmfile, "STDOUT");
outputfile = stdout;
}
else
@ -73,13 +81,6 @@ int main(int argc, char **argv)
exit(1);
}
}
while (j && asmfile[j-1] != '/')
j--;
k = 1;
while (asmfile[j] != '.')
modfile[k++] = toupper(asmfile[j++]);
modfile[k] = '\0';
modfile[0] = k - 1;
}
else
{