VirtualBox

Changeset 3483 in kBuild


Ignore:
Timestamp:
Sep 21, 2020 12:06:15 PM (4 years ago)
Author:
bird
Message:

kash: Don't use cmdlist to dump nfile lists in cmdtxt, need a dedicated function there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/jobs.c

    r3480 r3483  
    8484STATIC void cmdtxt(shinstance *, union node *);
    8585STATIC void cmdlist(shinstance *, union node *, int);
     86STATIC void cmdredirlist(shinstance *, union node *, int);
    8687STATIC void cmdputs(shinstance *, const char *);
    8788STATIC shpid forkparent(shinstance *psh, struct job *jp, union node *n, int mode, shpid pid);
     
    13541355        case NCMD:
    13551356                cmdlist(psh, n->ncmd.args, 1);
    1356                 cmdlist(psh, n->ncmd.redirect, 0);
     1357                cmdredirlist(psh, n->ncmd.redirect, 0);
    13571358                break;
    13581359        case NARG:
     
    14061407                cmdtxt(psh, np);
    14071408                if (sep && np->narg.next)
     1409                        cmdputs(psh, " ");
     1410        }
     1411}
     1412
     1413STATIC void
     1414cmdredirlist(shinstance *psh, union node *np, int sep)
     1415{
     1416        for (; np; np = np->nfile.next) {
     1417                if (!sep)
     1418                        cmdputs(psh, " ");
     1419                cmdtxt(psh, np);
     1420                if (sep && np->nfile.next)
    14081421                        cmdputs(psh, " ");
    14091422        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette