diff -r 518bfd1cc1e8 -r 34a5e235d16e v2.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/v2.c Mon May 23 16:43:13 2011 +0200 @@ -0,0 +1,17 @@ +#include "v2.h" +#include "include.h" + +int checkArgument(const char* arg, const char* expected) { + int len = strlen(expected); + int ret = 0; + + if (arg[0] == '-') { + if (arg[1] != '-') { + for (int t = 0 ; t < len ; t++) { + ret |= (strchr(arg, expected[t]) > 0) << t; + } + } + } + + return ret; +}