]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-regex.c
SearchCtx should contain 'type' - this is to make life easier when defining new searc...
[irc/quakenet/newserv.git] / newsearch / ns-regex.c
index 8876d1cbf2533c2a79830e0086ab04eb08622c0b..5d86ecc7f97133064e66a3a1aaaf785336709b12 100644 (file)
@@ -19,7 +19,7 @@ struct regex_localdata {
 void *regex_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
 void regex_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *regex_parse(searchCtx *ctx, int type, int argc, char **argv) {
+struct searchNode *regex_parse(searchCtx *ctx, int argc, char **argv) {
   struct regex_localdata *localdata;
   struct searchNode *thenode;
   struct searchNode *targnode, *patnode;
@@ -33,11 +33,11 @@ struct searchNode *regex_parse(searchCtx *ctx, int type, int argc, char **argv)
     return NULL;
   }
 
-  targnode=ctx->parser(ctx, type, argv[0]);
+  targnode=ctx->parser(ctx, argv[0]);
   if (!(targnode = coerceNode(ctx,targnode, RETURNTYPE_STRING)))
     return NULL;
 
-  patnode=ctx->parser(ctx, type, argv[1]);
+  patnode=ctx->parser(ctx, argv[1]);
   if (!(patnode = coerceNode(ctx,patnode, RETURNTYPE_STRING))) {
     (targnode->free)(ctx, targnode);
     return NULL;