memset(&cache, 0, sizeof(cache));
cache.tree = tree;
- ctx.reply = reply;
- ctx.wall = wall;
- ctx.parser = search_astparse;
- ctx.arg = (void *)&cache;
+ newsearch_ctxinit(&ctx, search_astparse, reply, wall, &cache);
buf[0] = '\0';
reply(sender, "Parsing: %s", ast_printtree(buf, sizeof(buf), tree));
searchNode *search;
char buf[1024];
- ctx.reply = reply;
- ctx.wall = wall;
- ctx.parser = search_astparse;
- ctx.arg = (void *)&cache;
+ newsearch_ctxinit(&ctx, search_astparse, reply, wall, &cache);
buf[0] = '\0';
reply(sender, "Parsing: %s", ast_printtree(buf, sizeof(buf), tree));
memset(&cache, 0, sizeof(cache));
cache.tree = tree;
- ctx.reply = reply;
- ctx.wall = wall;
- ctx.parser = search_astparse;
- ctx.arg = (void *)&cache;
+ newsearch_ctxinit(&ctx, search_astparse, reply, wall, &cache);
buf[0] = '\0';
reply(sender, "Parsing: %s", ast_printtree(buf, sizeof(buf), tree));