3 * getarguments.c -- Get the argument vector ready to go.
11 getarguments (char *invo_name, int argc, char **argv, int check_context)
13 char *cp, **ap, **bp, **arguments;
17 * Check if profile/context specifies any arguments
19 if (check_context && (cp = context_find (invo_name))) {
20 cp = getcpy (cp); /* make copy */
21 ap = brkstring (cp, " ", "\n"); /* split string */
23 /* Count number of arguments split */
29 if (!(arguments = (char **) malloc ((argc + n) * sizeof(*arguments))))
30 adios (NULL, "unable to malloc argument storage");
33 /* Copy any arguments from profile/context */
39 /* Copy arguments from command line */
44 /* Now NULL terminate the array */