v2.c

changeset 1
34a5e235d16e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/v2.c	Mon May 23 16:43:13 2011 +0200
@@ -0,0 +1,17 @@
+#include "v2.h"
+#include "include.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;
+}

mercurial