Deleted Added
full compact
eval.c (159633) eval.c (172440)
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/eval.c 159633 2006-06-15 07:57:05Z stefanf $");
39__FBSDID("$FreeBSD: head/bin/sh/eval.c 172440 2007-10-04 16:14:48Z stefanf $");
40
41#include <paths.h>
42#include <signal.h>
43#include <stdlib.h>
44#include <unistd.h>
45#include <sys/resource.h>
46#include <sys/wait.h> /* For WIFSIGNALED(status) */
47#include <errno.h>

--- 314 unchanged lines hidden (view full) ---

362 union node *cp;
363 union node *patp;
364 struct arglist arglist;
365 struct stackmark smark;
366
367 setstackmark(&smark);
368 arglist.lastp = &arglist.list;
369 oexitstatus = exitstatus;
40
41#include <paths.h>
42#include <signal.h>
43#include <stdlib.h>
44#include <unistd.h>
45#include <sys/resource.h>
46#include <sys/wait.h> /* For WIFSIGNALED(status) */
47#include <errno.h>

--- 314 unchanged lines hidden (view full) ---

362 union node *cp;
363 union node *patp;
364 struct arglist arglist;
365 struct stackmark smark;
366
367 setstackmark(&smark);
368 arglist.lastp = &arglist.list;
369 oexitstatus = exitstatus;
370 exitstatus = 0;
370 expandarg(n->ncase.expr, &arglist, EXP_TILDE);
371 for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
372 for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
373 if (casematch(patp, arglist.list->text)) {
374 if (evalskip == 0) {
375 evaltree(cp->nclist.body, flags);
376 }
377 goto out;

--- 730 unchanged lines hidden ---
371 expandarg(n->ncase.expr, &arglist, EXP_TILDE);
372 for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
373 for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
374 if (casematch(patp, arglist.list->text)) {
375 if (evalskip == 0) {
376 evaltree(cp->nclist.body, flags);
377 }
378 goto out;

--- 730 unchanged lines hidden ---