Thu, 20 Oct 2011 15:21:53 +0200
implemented bfile heuristics option + TODO: implement algorithm
/* * arguments.c * * Created on: 15.09.2011 * Author: Mike */ #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; }