1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/v2.c Mon May 23 16:43:13 2011 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +#include "v2.h" 1.5 +#include "include.h" 1.6 + 1.7 +int checkArgument(const char* arg, const char* expected) { 1.8 + int len = strlen(expected); 1.9 + int ret = 0; 1.10 + 1.11 + if (arg[0] == '-') { 1.12 + if (arg[1] != '-') { 1.13 + for (int t = 0 ; t < len ; t++) { 1.14 + ret |= (strchr(arg, expected[t]) > 0) << t; 1.15 + } 1.16 + } 1.17 + } 1.18 + 1.19 + return ret; 1.20 +}