- /*
- ** TODO: Split enough of scan.c out so that we can
- ** call it here.
- */
- command = concat("scan +", node->n_name, " ",
- sequences_s, (void *)NULL);
- system(command);
- free(command);
+ argc = 0;
+ argv[argc++] = "scan";
+ snprintf(buf, sizeof buf, "+%s", node->n_name);
+ argv[argc++] = buf;
+ for (cp=*sequences; *cp; cp++) {
+ argv[argc++] = cp;
+ }
+ argv[argc] = (char *)NULL;
+ execprog(*argv, argv);