From bbb0d75e253c9ef897bdf2d23ca76557ac540305 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 13 Nov 2000 10:22:40 +0000 Subject: use unmetafy() to allow writing special characters into a pty (13156) --- Src/Modules/zpty.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Src') 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)) -- cgit 1.4.1