Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: newlines in job-texts (was: Re: Questions)
- X-seq: zsh-workers 10799
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: newlines in job-texts (was: Re: Questions)
- Date: Tue, 18 Apr 2000 09:09:50 +0200 (MET DST)
- In-reply-to: Sven Wischnowsky's message of Mon, 17 Apr 2000 12:42:45 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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