Thu, 15 Sep 2011 13:38:03 +0200
Merge with 1dd63a32ffc486b71399045cf8443ec6ac9d7bf5
/* * arguments.c * * Created on: 15.09.2011 * Author: beckermi */ #include "arguments.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; } bool registerArgument(int* reg, int mask) { bool ret = (*reg & mask) > 0; *reg |= mask; return ret; }