Lines 91-97
static void evalfor(union node *, int);
Link Here
|
91 |
static union node *evalcase(union node *); |
91 |
static union node *evalcase(union node *); |
92 |
static void evalsubshell(union node *, int); |
92 |
static void evalsubshell(union node *, int); |
93 |
static void evalredir(union node *, int); |
93 |
static void evalredir(union node *, int); |
94 |
static void exphere(union node *, struct arglist *); |
|
|
95 |
static void expredir(union node *); |
94 |
static void expredir(union node *); |
96 |
static void evalpipe(union node *); |
95 |
static void evalpipe(union node *); |
97 |
static int is_valid_fast_cmdsubst(union node *n); |
96 |
static int is_valid_fast_cmdsubst(union node *n); |
Lines 486-525
evalredir(union node *n, int flags)
Link Here
|
486 |
} |
485 |
} |
487 |
|
486 |
|
488 |
|
487 |
|
489 |
static void |
|
|
490 |
exphere(union node *redir, struct arglist *fn) |
491 |
{ |
492 |
struct jmploc jmploc; |
493 |
struct jmploc *savehandler; |
494 |
struct localvar *savelocalvars; |
495 |
int need_longjmp = 0; |
496 |
unsigned char saveoptreset; |
497 |
|
498 |
redir->nhere.expdoc = ""; |
499 |
savelocalvars = localvars; |
500 |
localvars = NULL; |
501 |
saveoptreset = shellparam.reset; |
502 |
forcelocal++; |
503 |
savehandler = handler; |
504 |
if (setjmp(jmploc.loc)) |
505 |
need_longjmp = exception != EXERROR; |
506 |
else { |
507 |
handler = &jmploc; |
508 |
expandarg(redir->nhere.doc, fn, 0); |
509 |
redir->nhere.expdoc = fn->args[0]; |
510 |
INTOFF; |
511 |
} |
512 |
handler = savehandler; |
513 |
forcelocal--; |
514 |
poplocalvars(); |
515 |
localvars = savelocalvars; |
516 |
shellparam.reset = saveoptreset; |
517 |
if (need_longjmp) |
518 |
longjmp(handler->loc, 1); |
519 |
INTON; |
520 |
} |
521 |
|
522 |
|
523 |
/* |
488 |
/* |
524 |
* Compute the names of the files in a redirection list. |
489 |
* Compute the names of the files in a redirection list. |
525 |
*/ |
490 |
*/ |
Lines 549-555
expredir(union node *n)
Link Here
|
549 |
} |
514 |
} |
550 |
break; |
515 |
break; |
551 |
case NXHERE: |
516 |
case NXHERE: |
552 |
exphere(redir, &fn); |
517 |
expandarg(redir->nhere.doc, &fn, 0); |
|
|
518 |
redir->nhere.expdoc = fn.args[0]; |
553 |
break; |
519 |
break; |
554 |
} |
520 |
} |
555 |
} |
521 |
} |