summaryrefslogtreecommitdiff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-10-03 09:59:01 +0100
committerPeter Stephenson <pws@zsh.org>2016-10-03 09:59:01 +0100
commit36a11804b467d7553f8fdaed9320869d8d984f77 (patch)
treeee9938331b37c970b3e3a040b4fed34575aec417 /Src/zsh.h
parent6b2585147b842c69faecb136c17dbdda79b3e4b4 (diff)
downloadzsh-36a11804b467d7553f8fdaed9320869d8d984f77.tar.gz
zsh-36a11804b467d7553f8fdaed9320869d8d984f77.zip
39521: Refactor start of execcmd().
By splitting into _analyse and _exec execpline2() has easier access to the state at the start of execution. Use this to ensure we fork if this is a builtin with no arguments.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index 79747d624..a5d4455e3 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -489,6 +489,7 @@ typedef struct complist *Complist;
typedef struct conddef *Conddef;
typedef struct dirsav *Dirsav;
typedef struct emulation_options *Emulation_options;
+typedef struct execcmd_params *Execcmd_params;
typedef struct features *Features;
typedef struct feature_enables *Feature_enables;
typedef struct funcstack *Funcstack;
@@ -1391,6 +1392,21 @@ struct builtin {
*/
#define BINF_ASSIGN (1<<19)
+/**
+ * Parameters passed to execcmd().
+ * These are not opaque --- they are also used by the pipeline manager.
+ */
+struct execcmd_params {
+ LinkList args; /* All command prefixes, arguments & options */
+ LinkList redir; /* Redirections */
+ Wordcode beg; /* The code at the start of the command */
+ Wordcode varspc; /* The code for assignment parsed as such */
+ Wordcode assignspc; /* The code for assignment parsed as typeset */
+ int type; /* The WC_* type of the command */
+ int postassigns; /* The number of assignspc assiguments */
+ int htok; /* tokens in parameter list */
+};
+
struct module {
struct hashnode node;
union {