diff --git a/Implementierung/main.c b/Implementierung/main.c index 05d94c6..44b66ca 100644 --- a/Implementierung/main.c +++ b/Implementierung/main.c @@ -285,7 +285,7 @@ int main(int argc, char** argv) { switch (opt_long) { - case 'V': {// done, function needed + case 'V': { char *end; 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); 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; } - case 'B': { // done, function needed - // wird die Laufzeit der angegebenen Implementierung gemessen und ausgegeben (do this later) + case 'B': { char *end; long value = strtol(optarg,&end,10); @@ -316,10 +309,6 @@ int main(int argc, char** argv) amount_function_called = (size_t)value; 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; } @@ -343,9 +332,6 @@ int main(int argc, char** argv) } printf("real %f, img %f\n", starting_point_real,starting_point_imaginary); - - - // s , — Startpunkt der Berechnung break; } @@ -377,9 +363,6 @@ int main(int argc, char** argv) width = (size_t)widthValue; height = (ssize_t)heightValue; - - printf("width %zu, height %zd\n", width,height); - // -d , —Breite und Höhe des Bildausschnitts break; } @@ -395,8 +378,6 @@ int main(int argc, char** argv) } n = (unsigned) nValue; - printf("n:%u\n",n); - // -n —MaximaleAnzahlanIterationen pro Bildpixel break; } @@ -409,8 +390,6 @@ int main(int argc, char** argv) fprintf(stderr, "Invalid floating point number: %s\n",optarg); return EXIT_FAILURE; } - printf("r:%f\n", resolution); - // r —Schrittweite pro Bildpixel break; } @@ -430,35 +409,23 @@ int main(int argc, char** argv) } strcpy(output_data,optarg); - printf("output data: %s\n", output_data); // test - // -o —Ausgabedatei break; - case 'C': // done + case 'C': colored = true; - printf("colored:%d\n",colored); - // C|--color —Farbausgabe break; - case 'h': // done + case 'h': 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; - case 't': // done, function needed + case 't': 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; - default: // idk + default: // case '?' -> when the argument is not valid fprintf(stderr,"ERROR: Invalid argument -%c:\n",optopt); - // print error msg return EXIT_FAILURE; }