From f0e8173762a14d7675dbc7a12ed11b31b7691c9f Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 17 Apr 2000 10:46:01 +0000 Subject: display newlines as spaces in job-texts (10788) --- Src/text.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Src/text.c') 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); } /**/ -- cgit 1.4.1