diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2016-01-24 17:19:53 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2016-01-24 17:19:53 +0100 |
commit | 86ca06fb4b5a835caac37700952207db4c5073cd (patch) | |
tree | c2686e6d126d59052310c6bb7cd8df6d76fa0fca /Src/zsh.h | |
parent | 370659ae9ae918a07a7950bbc2827b2593126f7d (diff) | |
parent | d18ce35d060163ea0d531170b65e1c38311af166 (diff) | |
download | zsh-86ca06fb4b5a835caac37700952207db4c5073cd.tar.gz zsh-86ca06fb4b5a835caac37700952207db4c5073cd.zip |
Merge branch 'upstream' at 5.2-dev-1 into debian
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 34 |
1 files changed, 27 insertions, 7 deletions
@@ -192,24 +192,31 @@ struct mathfunc { #define Tilde ((char) 0x98) #define Qtick ((char) 0x99) #define Comma ((char) 0x9a) +#define Dash ((char) 0x9b) /* Only in patterns */ +#define Bang ((char) 0x9c) /* Only in patterns */ +/* + * Marks the last of the group above. + * Remaining tokens are even more special. + */ +#define LAST_NORMAL_TOK Bang /* * Null arguments: placeholders for single and double quotes * and backslashes. */ -#define Snull ((char) 0x9b) -#define Dnull ((char) 0x9c) -#define Bnull ((char) 0x9d) +#define Snull ((char) 0x9d) +#define Dnull ((char) 0x9e) +#define Bnull ((char) 0x9f) /* * Backslash which will be returned to "\" instead of being stripped * when we turn the string into a printable format. */ -#define Bnullkeep ((char) 0x9e) +#define Bnullkeep ((char) 0xa0) /* * 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) 0x9f) +#define Nularg ((char) 0xa1) /* * Take care to update the use of IMETA appropriately when adding @@ -220,7 +227,7 @@ struct mathfunc { * Also used in pattern character arrays as guaranteed not to * mark a character in a string. */ -#define Marker ((char) 0xa0) +#define Marker ((char) 0xa2) /* chars that need to be quoted if meant literally */ @@ -272,7 +279,12 @@ enum { /* * As QT_BACKSLASH, but a NULL string is shown as ''. */ - QT_BACKSLASH_SHOWNULL + QT_BACKSLASH_SHOWNULL, + /* + * Quoting as produced by quotedzputs(), used for human + * readability of parameter values. + */ + QT_QUOTEDZPUTS }; #define QT_IS_SINGLE(x) ((x) == QT_SINGLE || (x) == QT_SINGLE_OPTIONAL) @@ -1538,6 +1550,7 @@ enum zpc_chars { ZPC_KSH_STAR, /* * for *(...) in KSH_GLOB */ ZPC_KSH_PLUS, /* + for +(...) in KSH_GLOB */ ZPC_KSH_BANG, /* ! for !(...) in KSH_GLOB */ + ZPC_KSH_BANG2, /* ! for !(...) in KSH_GLOB, untokenised */ ZPC_KSH_AT, /* @ for @(...) in KSH_GLOB */ ZPC_COUNT /* Number of special chararacters */ }; @@ -3051,6 +3064,13 @@ enum { #define AFTERTRAPHOOK (zshhooks + 2) #ifdef MULTIBYTE_SUPPORT +/* Final argument to mb_niceformat() */ +enum { + NICEFLAG_HEAP = 1, /* Heap allocation where needed */ + NICEFLAG_QUOTE = 2, /* Result will appear in $'...' */ + NICEFLAG_NODUP = 4, /* Leave allocated */ +}; + /* Metafied input */ #define nicezputs(str, outs) (void)mb_niceformat((str), (outs), NULL, 0) #define MB_METACHARINIT() mb_charinit() |