Mon, 23 May 2011 16:43:13 +0200
cline version 2
1 | 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 | } |