--- a/arguments.c Tue Oct 02 10:49:25 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * 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; -} - -bool checkParamOpt(int* paropt) { - bool ret = *paropt == 0; - *paropt = 1; - return ret; -} - -void parseCSL(char* csl, string_list_t* list) { - if (csl != NULL) { - char* finder = strtok(csl, ","); - while (finder != NULL) { - add_string(list, finder); - finder = strtok(NULL, ","); - } - } -}