]>
jfr.im git - irc/quakenet/newserv.git/blob - newsearch/ns-not.c
10 void not_free(struct searchNode
*thenode
);
11 void *not_exe(struct searchNode
*thenode
, int type
, void *theinput
);
13 struct searchNode
*not_parse(int type
, int argc
, char **argv
) {
14 searchNode
*thenode
, *subnode
;
17 parseError
="not: usage: not (term)";
21 /* Allocate our actual node */
22 thenode
=(searchNode
*)malloc(sizeof(searchNode
));
24 thenode
->returntype
= RETURNTYPE_BOOL
;
25 thenode
->exe
= not_exe
;
26 thenode
->free
= not_free
;
28 subnode
=search_parse(type
, argv
[0]); /* Propogate the search type */
35 thenode
->localdata
=(void *)subnode
;
40 void not_free(struct searchNode
*thenode
) {
41 struct searchNode
*subnode
;
42 subnode
=thenode
->localdata
;
44 (subnode
->free
)(subnode
);
48 void *not_exe(struct searchNode
*thenode
, int type
, void *theinput
) {
50 struct searchNode
*subnode
;
52 subnode
=thenode
->localdata
;
54 ret
= (subnode
->exe
)(subnode
, RETURNTYPE_BOOL
, theinput
);
66 case RETURNTYPE_STRING
: