about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-09-10 18:10:48 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-09-10 18:10:48 +0000
commit80acfd135cb41dc63b2e037fe8c18bcf46ce929c (patch)
treed7827b367db9afcddb8c6302c686da47f96ef2a5 /Src/subst.c
parentb726ead94e911e1ce3e8b582c315b3d6f83a6eb7 (diff)
downloadzsh-80acfd135cb41dc63b2e037fe8c18bcf46ce929c.tar.gz
zsh-80acfd135cb41dc63b2e037fe8c18bcf46ce929c.tar.xz
zsh-80acfd135cb41dc63b2e037fe8c18bcf46ce929c.zip
22684: improve getkeystring() interface and make printf do octal escapes
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 67afd0f03..1e8907d5c 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -150,7 +150,7 @@ stringsubst(LinkList list, LinkNode node, int ssub, int asssub)
 		setdata(node, (void *) str3);
 		continue;
 	    } else if (c == Snull) {
-		str = getkeystring(str, NULL, 4, NULL);
+		str = getkeystring(str, NULL, GETKEYS_DOLLARS_QUOTE, NULL);
 		continue;
 	    } else {
 		node = paramsubst(list, node, &str, qt, ssub);
@@ -272,7 +272,7 @@ quotesubst(char *str)
 
     while (*s) {
 	if (*s == String && s[1] == Snull) {
-	    s = getkeystring(s, NULL, 4, NULL);
+	    s = getkeystring(s, NULL, GETKEYS_DOLLARS_QUOTE, NULL);
 	} else {
 	    s++;
 	}
@@ -942,7 +942,7 @@ substevalchar(char *ptr)
 
 	/* inefficient: should separate out \U handling from getkeystring */
 	sprintf(buf, "\\U%.8x", (unsigned int)ires);
-	return getkeystring(buf, &dummy, 2, NULL);
+	return getkeystring(buf, &dummy, GETKEYS_BINDKEY, NULL);
     } else {
 	ptr = zhalloc(2);
 	sprintf(ptr, "%c", (int)ires);
@@ -1232,7 +1232,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 #define UNTOK_AND_ESCAPE(X) {\
 		untokenize(X = dupstring(s + 1));\
 		if (escapes) {\
-		    X = getkeystring(X, &klen, 3, NULL);\
+		    X = getkeystring(X, &klen, GETKEYS_SEP, NULL);\
 		    X = metafy(X, klen, META_HREALLOC);\
 		}\
 	    }