diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | Src/text.c | 5 |
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); } /**/ |