summaryrefslogtreecommitdiff
path: root/Src/zsh.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index 834142895..82d152bb8 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -832,13 +832,33 @@ struct estate {
char *strs; /* strings from prog */
};
+/*
+ * A binary tree of strings.
+ *
+ * Refer to the "Word code." comment at the top of Src/parse.c for details.
+ */
typedef struct eccstr *Eccstr;
-
struct eccstr {
+ /* Child pointers. */
Eccstr left, right;
+
+ /* String; pointer into to estate::strs. */
char *str;
- wordcode offs, aoffs;
+
+ /* Wordcode of a long string, as described in the Src/parse.c comment. */
+ wordcode offs;
+
+ /* Raw memory offset of str in estate::strs. */
+ wordcode aoffs;
+
+ /*
+ * ### The number of starts and ends of function definitions up to this point.
+ *
+ * String reuse may only happen between strings that have the same "nfunc" value.
+ */
int nfunc;
+
+ /* Hash of str. */
int hashval;
};