diff options
author | jilles <jilles@FreeBSD.org> | 2015-10-11 21:33:00 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-10-11 21:33:00 +0000 |
commit | 5edc3be36a94a4e6d00b23f4a78f7a34f298354a (patch) | |
tree | de27811dc69dd87b6197cb836792e2f49ede3869 /bin/sh/eval.h | |
parent | 4b946e6d78df59fc08a27d0a0830f287a59ff27f (diff) | |
download | FreeBSD-src-5edc3be36a94a4e6d00b23f4a78f7a34f298354a.zip FreeBSD-src-5edc3be36a94a4e6d00b23f4a78f7a34f298354a.tar.gz |
sh: Make struct arglist an array instead of a linked list.
This simplifies the code (e.g. allowing use of qsort(3) instead of a
hand-rolled mergesort) and should have better cache properties.
The waste of unused args arrays after resizes is approximately the same as
the savings from getting rid of the next pointers.
At the same time, remove a piece of global state and move some duplicated
code into a function.
Diffstat (limited to 'bin/sh/eval.h')
-rw-r--r-- | bin/sh/eval.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/eval.h b/bin/sh/eval.h index d4092be..e781336 100644 --- a/bin/sh/eval.h +++ b/bin/sh/eval.h @@ -36,7 +36,7 @@ extern char *commandname; /* currently executing command */ extern int exitstatus; /* exit status of last command */ extern int oexitstatus; /* saved exit status */ -extern struct strlist *cmdenviron; /* environment for builtin command */ +extern struct arglist *cmdenviron; /* environment for builtin command */ struct backcmd { /* result of evalbackcmd */ |