* © 2008 by David Roden <droden@gmail.com>
*/
+#include <string.h>
#include "Main.h"
+void printSyntaxHelp() {
+ printf("ecparse %s - © 2008 by David ‘Bombe’ Roden <bombe@pterodactylus.net\n", VERSION);
+ printf("ecparse [ -v | --verbose ] [ { -f | --file } <file> ]\n");
+}
+
int main(int argc, char** argv) {
FileReaderInput* fileReaderInput;
CollectionReader* collectionReader;
+ char* currentArgument;
+ char* fileToOpen = NULL;
+ int argumentIndex;
+
+ for (argumentIndex = 1; argumentIndex < argc; argumentIndex++) {
+ currentArgument = argv[argumentIndex];
+ if (!strcmp("--help", currentArgument) || !strcmp("-h", currentArgument)) {
+ printSyntaxHelp();
+ } else if (!strcmp("--verbose", currentArgument) || !strcmp("-v", currentArgument)) {
+ GlobalSettings::getInstance()->setVerbose(true);
+ } else if (!strcmp("--file", currentArgument) || !strcmp("-f", currentArgument)) {
+ fileToOpen = currentArgument;
+ } else {
+ printf("Unknown Parameter: %s\n", currentArgument);
+ return 1;
+ }
+ }
return 0;
}