#include <stdio.h>
#include <stdlib.h>
-void *exists_exe(struct searchNode *thenode, void *theinput);
-void exists_free(struct searchNode *thenode);
+void *exists_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void exists_free(searchCtx *ctx, struct searchNode *thenode);
-struct searchNode *exists_parse(int type, int argc, char **argv) {
+struct searchNode *exists_parse(searchCtx *ctx, int argc, char **argv) {
struct searchNode *thenode;
- if (type != SEARCHTYPE_CHANNEL) {
- parseError = "exists: this function is only valid for channel searches.";
- return NULL;
- }
-
if (!(thenode=(struct searchNode *)malloc(sizeof (struct searchNode)))) {
parseError = "malloc: could not allocate memory for this search.";
return NULL;
return thenode;
}
-void *exists_exe(struct searchNode *thenode, void *theinput) {
+void *exists_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
chanindex *cip = (chanindex *)theinput;
if (cip->channel == NULL)
return (void *)1;
}
-void exists_free(struct searchNode *thenode) {
+void exists_free(searchCtx *ctx, struct searchNode *thenode) {
free(thenode);
}