Removed under-used optimization options

This commit is contained in:
2022-08-19 19:27:23 +01:00
parent 4f0aebc32f
commit 97e72550da
4 changed files with 4 additions and 13 deletions

View File

@@ -17,7 +17,6 @@ void initCommand(int argc, const char* argv[]) {
command.outfile = "out.tb";
command.source = NULL;
command.verbose = false;
command.optimize = 1;
for (int i = 1; i < argc; i++) { //start at 1 to skip the program name
command.error = true; //error state by default, set to false by successful flags
@@ -40,12 +39,6 @@ void initCommand(int argc, const char* argv[]) {
continue;
}
if (!strncmp(argv[i], "-O", 2)) {
sscanf(argv[i], "-O%d", &command.optimize);
command.error = false;
continue;
}
if ((!strcmp(argv[i], "-f") || !strcmp(argv[i], "--sourcefile")) && i + 1 < argc) {
command.sourcefile = (char*)argv[i + 1];
i++;
@@ -89,7 +82,7 @@ void initCommand(int argc, const char* argv[]) {
}
void usageCommand(int argc, const char* argv[]) {
printf("Usage: %s [<file.tb> | -h | -v | [-d][-OX][-f file | -i source | -c file [-o outfile]]]\n\n", argv[0]);
printf("Usage: %s [<file.tb> | -h | -v | [-d][-f file | -i source | -c file [-o outfile]]]\n\n", argv[0]);
}
void helpCommand(int argc, const char* argv[]) {
@@ -99,7 +92,6 @@ void helpCommand(int argc, const char* argv[]) {
printf("-h\t| --help\t\tShow this help then exit.\n\n");
printf("-v\t| --version\t\tShow version and copyright information then exit.\n\n");
printf("-d\t| --debug\t\tBe verbose when operating.\n\n");
printf("-OX\t\t\t\tUse level X optimization (default 1)\n\n");
printf("-f\t| --file filename\tParse, compile and execute the source file.\n\n");
printf("-i\t| --input source\tParse, compile and execute this given string of source code.\n\n");
printf("-c\t| --compile filename\tParse and compile the specified source file into an output file.\n\n");