2022-06-29 10:50:55 +02:00
|
|
|
#include "helper.h"
|
2022-06-29 10:58:49 +02:00
|
|
|
#include "io.h"
|
|
|
|
#include "md2.h"
|
2022-06-29 10:50:55 +02:00
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
2022-06-29 11:12:35 +02:00
|
|
|
struct configuration c;
|
|
|
|
enum argumentParseResult result = parseArguments(argc, argv, &c);
|
2022-06-29 10:50:55 +02:00
|
|
|
|
2022-06-29 11:12:35 +02:00
|
|
|
switch (result) {
|
2022-06-29 10:50:55 +02:00
|
|
|
case RESULT_EXIT_SUCCESS:
|
2022-06-29 11:12:35 +02:00
|
|
|
return EXIT_SUCCESS;
|
2022-06-29 10:50:55 +02:00
|
|
|
case RESULT_EXIT_FAILURE:
|
2022-06-29 11:12:35 +02:00
|
|
|
return EXIT_FAILURE;
|
2022-06-29 10:50:55 +02:00
|
|
|
default:
|
2022-06-29 11:12:35 +02:00
|
|
|
break;
|
|
|
|
}
|
2022-06-29 10:50:55 +02:00
|
|
|
|
2022-06-29 11:12:35 +02:00
|
|
|
printf(
|
|
|
|
"Hashing file: %s\nUsing implementation: %d, doing benchmark: %d, "
|
|
|
|
"benchmark cycles: %d\n",
|
|
|
|
c.filename, c.implementationToUse, c.doBenchmark, c.benchmarkingCycles);
|
2022-06-29 10:50:55 +02:00
|
|
|
|
2022-06-29 11:12:35 +02:00
|
|
|
return 0;
|
2022-06-29 10:50:55 +02:00
|
|
|
}
|