about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 10:46:01 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 10:46:01 +0000
commitf0e8173762a14d7675dbc7a12ed11b31b7691c9f (patch)
tree298ca397f3026dc63706486478be6f8b74ca5e57
parentfcca6c721cde7780c91912aba0afbd44bd1818d5 (diff)
downloadzsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.gz
zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.tar.xz
zsh-f0e8173762a14d7675dbc7a12ed11b31b7691c9f.zip
display newlines as spaces in job-texts (10788)
-rw-r--r--ChangeLog2
-rw-r--r--Src/text.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a96996ad3..0d60db4df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 
 2000-04-17  Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
 
+	* 10788: Src/text.c: display newlines as spaces in job-texts
+	
 	* 10782: Src/Zle/computil.c: fix for exclusion lists for -+o
  	specifications
 	
diff --git a/Src/text.c b/Src/text.c
index ab6ca5eb9..8823a69bc 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -58,6 +58,7 @@ static void
 taddstr(char *s)
 {
     int sl = strlen(s);
+    char c;
 
     while (tptr + sl >= tlim) {
 	int x = tptr - tbuf;
@@ -68,8 +69,8 @@ taddstr(char *s)
 	tlim = tbuf + tsiz;
 	tptr = tbuf + x;
     }
-    strcpy(tptr, s);
-    tptr += sl;
+    while ((c = *s++))
+	*tptr++ = (c == '\n' ? ' ' : c);
 }
 
 /**/