- /* Get the length of the argument list. */
- for (argc = 0; t; t = t->next, argc++);
-
- /* Account for argv[0] being a command name. This makes our life easier. */
- argc++;
- argv = (char **)xmalloc ((1 + argc) * sizeof (char *));
- argv[argc] = (char *)NULL;
-
- /* this_command_name is the name of the command that invoked this
- function. So you can't call test_builtin () directly from
- within this code, there are too many things to worry about. */
- argv[0] = savestring (this_command_name);
-
- for (t = list, argc = 1; t; t = t->next, argc++)
- argv[argc] = savestring (t->word->word);
-