removed: unnecessary fprints and comments

This commit is contained in:
Cem
2026-07-15 20:46:50 +02:00
parent ea53cb8a9a
commit a4d3fbd100
+6 -39
View File
@@ -285,7 +285,7 @@ int main(int argc, char** argv)
{ {
switch (opt_long) switch (opt_long)
{ {
case 'V': {// done, function needed case 'V': {
char *end; char *end;
version_to_use = strtol(optarg,&end,10); version_to_use = strtol(optarg,&end,10);
@@ -295,17 +295,10 @@ int main(int argc, char** argv)
fprintf(stderr,"Invalid version to use: V%s. Available versions are : V0,V1,V2,V3\n", optarg); fprintf(stderr,"Invalid version to use: V%s. Available versions are : V0,V1,V2,V3\n", optarg);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
printf("version is %d\n", version_to_use);
// call different version functions
// Die Implementierung, die verwendet werden soll. Hierbei soll mit
// -V 0 Ihre Hauptimplementierung verwendet werden. Wenn diese Option nicht
// gesetzt wird, soll ebenfalls die Hauptimplementierung ausgeführt werden
break; break;
} }
case 'B': { // done, function needed case 'B': {
// wird die Laufzeit der angegebenen Implementierung gemessen und ausgegeben (do this later)
char *end; char *end;
long value = strtol(optarg,&end,10); long value = strtol(optarg,&end,10);
@@ -316,10 +309,6 @@ int main(int argc, char** argv)
amount_function_called = (size_t)value; amount_function_called = (size_t)value;
will_benchmark = true; will_benchmark = true;
printf("amount function called is %zu\n", amount_function_called);
// call benchmarking function
// Das Argument dieser Option gibt die Anzahl an Wiederholungen des Funktionsaufrufs an, z. B.-B 5 .
break; break;
} }
@@ -343,9 +332,6 @@ int main(int argc, char** argv)
} }
printf("real %f, img %f\n", starting_point_real,starting_point_imaginary); printf("real %f, img %f\n", starting_point_real,starting_point_imaginary);
// s <Realteil>,<Imaginärteil> — Startpunkt der Berechnung
break; break;
} }
@@ -377,9 +363,6 @@ int main(int argc, char** argv)
width = (size_t)widthValue; width = (size_t)widthValue;
height = (ssize_t)heightValue; height = (ssize_t)heightValue;
printf("width %zu, height %zd\n", width,height);
// -d <Zahl>,<Zahl> —Breite und Höhe des Bildausschnitts
break; break;
} }
@@ -395,8 +378,6 @@ int main(int argc, char** argv)
} }
n = (unsigned) nValue; n = (unsigned) nValue;
printf("n:%u\n",n);
// -n <Zahl> —MaximaleAnzahlanIterationen pro Bildpixel
break; break;
} }
@@ -409,8 +390,6 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid floating point number: %s\n",optarg); fprintf(stderr, "Invalid floating point number: %s\n",optarg);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
printf("r:%f\n", resolution);
// r <Floating Point Zahl> —Schrittweite pro Bildpixel
break; break;
} }
@@ -430,35 +409,23 @@ int main(int argc, char** argv)
} }
strcpy(output_data,optarg); strcpy(output_data,optarg);
printf("output data: %s\n", output_data); // test
// -o <Dateiname> —Ausgabedatei
break; break;
case 'C': // done case 'C':
colored = true; colored = true;
printf("colored:%d\n",colored);
// C|--color —Farbausgabe
break; break;
case 'h': // done case 'h':
printf("%s",help_messsage); printf("%s",help_messsage);
// print help message
// Eine Beschreibung aller Optionen des Programms und Verwendungsbeispiele werden ausgegeben und das Programm danach beendet.
// Die Beschreibung soll mit "Help Message" anfangen.
return EXIT_SUCCESS; return EXIT_SUCCESS;
case 't': // done, function needed case 't':
will_test = true; will_test = true;
// Führt eine vordefinierte Testsuite aus, welche sämtliche von Ihnen
// verwendete Benchmarking-Szenarien gesammelt durchläuft. Das Programm gibt
// die jeweiligen Parameter, eine kurze Beschreibungen sowie die Ergebnisse in einer
// übersichtlichen und gut lesbaren Form aus und terminiert anschließend.
break; break;
default: // idk default:
// case '?' -> when the argument is not valid // case '?' -> when the argument is not valid
fprintf(stderr,"ERROR: Invalid argument -%c:\n",optopt); fprintf(stderr,"ERROR: Invalid argument -%c:\n",optopt);
// print error msg
return EXIT_FAILURE; return EXIT_FAILURE;
} }