v2.c

changeset 1
34a5e235d16e
equal deleted inserted replaced
0:518bfd1cc1e8 1:34a5e235d16e
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