#include "refer.h" void callhunt(char *in, char *out, char *arg, int outlen) { # define ALEN 50 char *argv[20], abuff[ALEN]; extern int typeindex; int argc; extern char one[]; extern int onelen; argv[0] = "hunt"; argv[1] = "-i"; argv[2] = in; argv[3] = "-t"; argv[4] = out; argv[5] = (char *)outlen; argv[6] = "-T"; argv[7] = "-F1"; argv[8] = "-o"; argv[9] = one; argv[10] = (char *)onelen; argv[11] = abuff; argv[12] = 0; if (strlen(arg) >= ALEN) err("abuff not big enough %d", strlen(arg)); strcpy(abuff, arg); for (argc=0; argv[argc]; argc++) ; huntmain(argc, argv); } void dodeliv(char *in, char *out, char *arg, int outlen) { # if D1 fprintf(stderr, "in dodeliv, arg /%s/\n", arg ? arg : ""); # endif if (arg && arg[0]) if (chdir(arg) < 0) err("can't chdir to %s", arg); findline(in, out, outlen, 0L); restodir(); }