diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-02-11 20:42:15 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-02-11 20:42:15 +0000 |
commit | c7d8b0dfb8ae9670e2bc11ecf563200069a3a12f (patch) | |
tree | 822403086b3d6d77bb14846b6e286d59389da12c /Src/zsh.h | |
parent | 0d02cf343eda943c32f7edfd24f28dbbd7004e32 (diff) | |
download | zsh-c7d8b0dfb8ae9670e2bc11ecf563200069a3a12f.tar.gz zsh-c7d8b0dfb8ae9670e2bc11ecf563200069a3a12f.tar.xz zsh-c7d8b0dfb8ae9670e2bc11ecf563200069a3a12f.zip |
26546, 26556: sticky emulation for functions defined in emulate ... -c ...
environments, plus documentation
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index 36755c719..159806f2c 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -1067,6 +1067,7 @@ struct shfunc { char *filename; /* Name of file located in */ zlong lineno; /* line number in above file */ Eprog funcdef; /* function definition */ + int emulation; /* sticky emulation for function */ }; /* Shell function context types. */ @@ -1790,6 +1791,20 @@ struct histent { #define EMULATE_SH (1<<3) /* Bourne shell */ #define EMULATE_ZSH (1<<4) /* `native' mode */ +/* Test for a shell emulation. Use this rather than emulation directly. */ +#define EMULATION(X) (emulation & (X)) + +/* Return only base shell emulation field. */ +#define SHELL_EMULATION() (emulation & ((1<<5)-1)) + +/* Additional flags */ + +#define EMULATE_FULLY (1<<5) /* "emulate -R" in effect */ +/* + * Higher bits are used in options.c, record lowest unused bit... + */ +#define EMULATE_UNUSED (1<<6) + /* option indices */ enum { |