about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-10-11 16:48:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-10-11 16:48:05 +0000
commitcca66ab341ffa330908aa6ea8da03e991aa6903c (patch)
tree0b15ce734ec264fdd72c27d68e48bc65bdaf6d14 /Src/zsh.h
parent1eaa7fee0d111b999c44385eb4fda1ad604e3606 (diff)
downloadzsh-cca66ab341ffa330908aa6ea8da03e991aa6903c.tar.gz
zsh-cca66ab341ffa330908aa6ea8da03e991aa6903c.tar.xz
zsh-cca66ab341ffa330908aa6ea8da03e991aa6903c.zip
21862/21863: GLOB_SUBST shouldn't swallow up backslashes in parameter
substitutions that don't match anything.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index b10f0bea2..19cfe216d 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -120,7 +120,10 @@ struct mathfunc {
 
 #define DEFAULT_IFS	" \t\n\203 "
 
-/* Character tokens */
+/*
+ * Character tokens.
+ * These should match the characters in ztokens, defined in lex.c
+ */
 #define Pound		((char) 0x84)
 #define String		((char) 0x85)
 #define Hat		((char) 0x86)
@@ -141,15 +144,33 @@ struct mathfunc {
 #define Tilde		((char) 0x95)
 #define Qtick		((char) 0x96)
 #define Comma		((char) 0x97)
+/*
+ * Null arguments: placeholders for single and double quotes
+ * and backslashes.
+ */
 #define Snull		((char) 0x98)
 #define Dnull		((char) 0x99)
 #define Bnull		((char) 0x9a)
-#define Nularg		((char) 0x9b)
+/*
+ * Backslash which will be returned to "\" instead of being stripped
+ * when we turn the string into a printable format.
+ */
+#define Bnullkeep       ((char) 0x9b)
+/*
+ * Null argument that does not correspond to any character.
+ * This should be last as it does not appear in ztokens and
+ * is used to initialise the IMETA type in inittyptab().
+ */
+#define Nularg		((char) 0x9c)
 
-#define INULL(x)	(((x) & 0xfc) == 0x98)
+#define INULL(x)	(((x) & 0xf8) == 0x98)
 
+/*
+ * Take care to update the use of IMETA appropriately when adding
+ * tokens here.
+ */
 /* Marker used in paramsubst for rc_expand_param */
-#define Marker		((char) 0x9c)
+#define Marker		((char) 0xa0)
 
 /* chars that need to be quoted if meant literally */