about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-11-13 10:22:40 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-11-13 10:22:40 +0000
commitbbb0d75e253c9ef897bdf2d23ca76557ac540305 (patch)
tree719f4e522ce74e63a34180fec589f4f9fe49eea6
parent8bcdb3b0e14e6a43fb371f23886d65dfa47b9c31 (diff)
downloadzsh-bbb0d75e253c9ef897bdf2d23ca76557ac540305.tar.gz
zsh-bbb0d75e253c9ef897bdf2d23ca76557ac540305.tar.xz
zsh-bbb0d75e253c9ef897bdf2d23ca76557ac540305.zip
use unmetafy() to allow writing special characters into a pty (13156)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/zpty.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 59bbaa479..1175b1e6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-13  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 13156: Src/Modules/zpty.c: use unmetafy() to allow writing
+ 	special characters into a pty
+	
 2000-11-12  Clint Adams  <schizo@debian.org>
 
 	* unposted: Completion/Debian/_bug: fix thinkos, add new options
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index e76411a8b..dcca286c0 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -562,13 +562,15 @@ static int
 ptywrite(Ptycmd cmd, char **args, int nonl)
 {
     if (*args) {
-	char sp = ' ';
+	char sp = ' ', *tmp;
+	int len;
 
-	while (*args)
-	    if (ptywritestr(cmd, *args, strlen(*args)) ||
+	while (*args) {
+	    unmetafy((tmp = dupstring(*args)), &len);
+	    if (ptywritestr(cmd, tmp, len) ||
 		(*++args && ptywritestr(cmd, &sp, 1)))
 		return 1;
-
+	}
 	if (!nonl) {
 	    sp = '\n';
 	    if (ptywritestr(cmd, &sp, 1))