- /*
- ** Merge any arguments from command line (now in vec)
- ** and arguments from profile.
- */
- arguments = getarguments(sp, n, vec, 1);
- argp = arguments;
-
- debugsw = 0;
- forwsw = 1;
- inplace = 1;
-
- altmsg = NULL;
- annotext = NULL;
- distfile = NULL;
-
- vecp = 1; /* we'll get the zero'th element later */
- vec[vecp++] = "-library";
- vec[vecp++] = getcpy(toabsdir("+"));
-
- while ((cp = *argp++)) {
- if (*cp == '-') {
- switch (smatch(++cp, sendswitches)) {
- case AMBIGSW:
- ambigsw(cp, sendswitches);
- return;
- case UNKWNSW:
- advise(NULL, "-%s unknown\n", cp);
- return;
-
- case SHELPSW:
- snprintf(buf, sizeof(buf),
- "%s [switches]", sp);
- print_help(buf, sendswitches, 1);
- return;
- case SVERSIONSW:
- print_version(invo_name);
- return;
-
- case SPSHSW:
- pushed++;
- continue;
- case NSPSHSW:
- pushed = 0;
- continue;
-
- case FORWSW:
- forwsw++;
- continue;
- case NFORWSW:
- forwsw = 0;
- continue;
-
- case VERBSW:
- verbsw++;
- vec[vecp++] = --cp;
- continue;
- case NVERBSW:
- verbsw = 0;
- vec[vecp++] = --cp;
- continue;
-
- case DEBUGSW:
- debugsw++; /* fall */
- case NFILTSW:
- case FRMTSW:
- case NFRMTSW:
- case WATCSW:
- case NWATCSW:
- vec[vecp++] = --cp;
- continue;
-
- case ALIASW:
- case FILTSW:
- case WIDTHSW:
- vec[vecp++] = --cp;
- if (!(cp = *argp++) || *cp == '-') {
- advise(NULL, "missing argument to %s",
- argp[-2]);
- return;
- }
- vec[vecp++] = cp;
- continue;
-
- }
- }
- advise(NULL, "usage: %s [switches]", sp);
- return;
- }
-
- /* allow Aliasfile: profile entry */
- if ((cp = context_find("Aliasfile"))) {
- char **ap, *dp;