Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: newlines in job-texts (was: Re: Questions)



I'm sooo ashamed... When the text will not be used for a job-text, it
should still contain the newlines, of course.


Bye
 Sven

Index: Src/text.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/text.c,v
retrieving revision 1.3
diff -u -r1.3 text.c
--- Src/text.c	2000/04/17 10:46:01	1.3
+++ Src/text.c	2000/04/18 07:08:33
@@ -69,8 +69,12 @@
 	tlim = tbuf + tsiz;
 	tptr = tbuf + x;
     }
-    while ((c = *s++))
-	*tptr++ = (c == '\n' ? ' ' : c);
+    if (tnewlins) {
+	memcpy(tptr, s, sl);
+	tptr += sl;
+    } else
+	while ((c = *s++))
+	    *tptr++ = (c == '\n' ? ' ' : c);
 }
 
 /**/

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author