v2.c

changeset 3
510d6b198dde
parent 2
29ac790c27ad
child 4
c3acfb3b4957
equal deleted inserted replaced
2:29ac790c27ad 3:510d6b198dde
1 #include "v2.h"
2 #include "include.h"
3
4 int checkArgument(const char* arg, const char* expected) {
5 int len = strlen(expected);
6 int ret = 0;
7
8 if (arg[0] == '-') {
9 if (arg[1] != '-') {
10 for (int t = 0 ; t < len ; t++) {
11 ret |= (strchr(arg, expected[t]) > 0) << t;
12 }
13 }
14 }
15
16 return ret;
17 }

mercurial